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 are language structures and functions
Language structure: is the PHP language keywords, 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. Why language structure is faster than function
The reason is that 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 can be better understood as
What language structure is faster than a function.
3. Differences in language structure and functions
L language structure is faster than corresponding function function
L language structure is relatively robust in error handling, because it is a language keyword, so there is no re-processing links
The L language structure cannot be disabled in configuration items (php.ini), and functions can.
L language structures cannot be used as callback functions
4. List of language structures
L Echo ()
L print (), yes, it's a language structure
L Die ()
L Isset ()
L unset ()
L include (), no include_once ()
L require (), no require_once ()
L Array ()
L list ()
L Empty ()
5. See what you have in your program?!
The difference between PHP language structure (Language constructs) and functions