PHP has several special keywords, such as echo, print, die, require, and so on, although they work like functions, they are actually more like if, while such as control statements, rather than a function. In other words, when the interpreter encounters:
Copy Code code as follows:
print ' Hello world ';
When such an expression is not converted into a function call, it maps directly to a series of predefined operations. You can use the language composition with parentheses or without parentheses, but you must use parentheses when using a function.
You mentioned the "variable function", English is "variable function", the meaning of the variable function, translated into "variable function" also a bit distorted the meaning of the variable (variable) this noun by the adjective (variable) to translate the term. The variable function in PHP means that if you add a pair of parentheses behind a variable, the interpreter will try to find a function that is the same as the value of the variable, and execute it if found. For example, if you have a function foo (), you can call this function in the following way:
Copy Code code as follows:
Initialization of a string variable
$func = ' Foo ';
Find the name and the same function as the string, and execute it
$func ();
So, the meaning of the sentence you mentioned is that it is not permissible to invoke a language composition in this way by using a variable function, such as the following:
Copy Code code as follows:
$func = ' print ';
This creates an exception because print is not a function, but rather a constituent part of the language
$func (' Hello World ');
Executing this code produces an exception, and the function print is undefined.