The runkit_lint_file() function performs a syntax (lint) check on the specified filename testing for scripting errors. This is similar to using php -l from the commandline.
Note: Sandbox support (required for runkit_lint(), runkit_lint_file(), and the Runkit_Sandbox class) is only available with PHP 5.1 or specially patched versions of PHP 5.0 and requires that thread safety be enabled. See the README file included in the runkit package for more information.