It was found that the isset function of PHP in the boiled fish was more efficient than that of array_key_exists by mistake. The isset function of PHP in the boiled fish was more efficient than array_key_exists by mistake:
Script ec (2); script
Because isset belongs to the language structure in php, and array_key_exists is a function, isset is faster. In addition, isset also exists in other languages and is more readable.
I am confused. What is isset actually not a function? As for the processing efficiency, isset is faster, which is less important (at least I have been using isset and have hardly followed array_key_exists. For details, see the article)
In PHP.net, it is also divided into Variable handling functions, but in fact there is such a paragraph in the middle:
Note: A language constructor rather than a function cannot be called by a variable function.
PHP contains several special keywords, such as echo, print, die, and require. Although they are used as functions, they are actually similar to control statements like if and while, rather than a function. That is, when the interpreter encounters:
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.
Variable Function visibility: http://www.php.net/manual/zh/functions.variable-functions.php
$ Func = 'foo ';
$ Func (); // This callfoo ()
$ Func = 'bar ';
$ Func ('test'); // This callbar ()
$ Func = 'echoit ';
$ Func ('test'); // This callechoit ()
If
$ Func = 'print ';
// This will cause an exception because print is not a function but a component of the language.
$ Func ('Hello World ');
If you write this statement, an error is reported.
In the PHP source code, isset is written as follows:
Obviously, it is not a function writing method.
I have a long experience.