The "language constructor" you mentioned is "languageconstruct" in English, which means the language, translation into a language constructor is a bit confusing. PHP contains several special keywords, such as echo, print, die, and require. although they are used as functions, but in fact, it is more like a control statement like if and while, rather than a function. That is, when the interpreter encounters:
The code is as follows:
Print 'Hello World ';
In such an expression, it is not converted into a function call, but directly mapped to a series of pre-defined operations. When using a language, you can add parentheses or do not add parentheses, but you must add parentheses when using a function.
The variable function you mentioned is variable function. translating it into a variable function is also a little distorted) the term is translated according to the meaning of the adjective (variable. The Variable function in PHP is a function with the same name and value as the Variable if a pair of parentheses is added to the Variable. if the Variable is found, the interpreter tries to execute it. For example, if there is a function foo (), you can use the following method to call this function:
The code is as follows:
// Initialize a string variable
$ Func = 'foo ';
// Find the function with the same name as this string and execute it
$ Func ();
Therefore, the meaning of the sentence you mentioned is that using a variable function to call a language is not allowed. for example:
The code is as follows:
$ Func = 'print ';
// This will cause an exception because print is not a function but a component of the language.
$ Func ('Hello World ');
When this code is executed, an exception occurs, and the print function is not defined.