Home >Backend Development >PHP Tutorial >PHP compilation error
Starting with PHP 7.3, the CompileError exception was added. This class inherits the Error class. Certain error conditions that previously resulted in fatal errors now raise CompileError. This affects compilation errors that may be thrown by the token_get_all() function.
token_get_all() The function uses the Zend lexical scanner to parse the given string into PHP language tokens.
token_get_all ( string $source [, int $flags = 0 ] ) : array
Sr.No | Parameters and description |
---|---|
1 | Source PHP source to parse |
2 |
Flags TOKEN_PARSE - Identifies the ability to use a reserved word in a specific context. |
This function should be used in TOKEN_PARSE mode to be able to raise CompileError.
The above is the detailed content of PHP compilation error. For more information, please follow other related articles on the PHP Chinese website!