Home > Article > Backend Development > Introduction to PHP language constructors_PHP tutorial
There are several special keywords in PHP such as echo, print, die, require, etc. Although they look like functions, they are actually more similar to control statements such as if and while, rather than a function. That is, when the interpreter encounters:
The "variable function" you mentioned is "variable function" in English. The meaning of variable function is a bit distorted when translated into "variable function". The noun variable (variable) is used as an adjective (variable). ) to translate the meaning. Variable function in PHP means that if you add a pair of parentheses after a variable, the interpreter will try to find a function with the same name as the value of the variable, and execute it if it is found. For example, there is a function foo(), then you can call this function in the following way:
So, the meaning of the sentence you mentioned is that it is not allowed to use variable functions to call a language construct, such as the following:
Executing this code will generate an exception because the function print is not defined.