php_check_syntax
Check the PHP syntax of the specified file
Descriptionboolphp_check_syntaxstringfile_namestring&error_message
The php_check_syntax function performs a syntax
(lint) check on the specified filename testing
for scripting errors. This is similar to using php -l
from the commandline.
If the error_message parameter is used, it will
contain the error message generated by the syntax check. error_message
is passed by
reference.
The following example shows how this function can be used.
php_check_syntax example
]]>
The output of the above script could look something like this: