What does $this $function () mean in PHP? How to solve it

Source: Internet
Author: User
What does $this $function () mean in PHP?
Brothers, recently the younger brother is looking at the code of the daily purchase, the result in/modules/index.mod.php see such a piece of code:
PHP Code
  
   function ModuleObject ($config)    {        $this->masterobject ($config);        $runCode = Load::modulecode ($this);        $this $runCode ();    }

$this-> $runCode () in the five lines of code, what is the special meaning of this sentence in PHP? Because I do not have the normal training of PHP, so some less commonly used basic rules do not understand, I hope you can guide the predecessors, grateful.

------Solution--------------------
Handbook Cloud:

Variable function
PHP supports the concept of variable functions. This means that if a variable name has parentheses after it, PHP will look for a function with the same name as the value of the variable and will attempt to execute it.

------Solution--------------------
$this $runCode ();
It must be in your class.
------Solution--------------------
Class ModuleObject extends Masterobject
Go to his parent class and the public class to find
Go to config file config.php (usually called this) to see the introduced class file
------Solution--------------------
$runCode = Load::modulecode ($this);
$this $runCode ();
The second row of $runcode and the first row of the $runcode have a relationship?
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.