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?