The difference between PHP language structure (Language constructs) and functions
I believe you often see a comparison of some PHP applications, said to replace strlen () with Isset (), isset than strlen execution speed and so on. Example: if (Isset ($username [5])) { //The username is at least six characters long.} The reason is that isset is a language structure, and strlen is a function. What is the language structure? Is it different from the function? 1, What is the language structure and function language structure: is the PHP language keyword, language grammar part; it can not be defined by the user or added to the language extension or library; it can have or can have no variables and return values. Function: Consists of blocks of code that can be reused. 2, the reason why the language structure is faster than the function is in PHP, the function must first be decomposed into the language structure of the PHP parser, so there is this visible, the function is more than the language structure of a layer of parser parsing. This makes it better to understand why the language structure is faster than the function. 3, the language structure and function of the different language structure than the corresponding function of the function of the fast language structure is relatively robust in error handling, because it is a language keyword, so there is no re-processing link language structure can not be disabled in the configuration item (php.ini), function. The language structure cannot be used as a callback function 4, the language structure list echo () print (), yes, this is a language structure die () isset (): Only for variable unset () include (), no include_once () require (), no require_once () array () list ()
Excerpt from: http://blog.sina.com.cn/s/blog_475429950100hk75.html