You mentioned "Language builder", English is "language construct", is the meaning of language composition, translation into a language builder is inevitably a bit confusing. 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:
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:
1 2 3 4 5 |
Initializes a string variable $func = ' foo '; Find the same function as the name and 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:
1 2 3 4 |
$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.