文字

runkit_lint

(PECL runkit >= 0.7.0)

runkit_lint Check the PHP syntax of the specified php code

说明

bool runkit_lint ( string $code )

The runkit_lint() function performs a syntax (lint) check on the specified php code testing for scripting errors. This is similar to using php -l from the command line except runkit_lint() accepts actual code rather than a filename.

Note: 沙箱支持(是 runkit_lint() runkit_lint_file() 函数,与 Runkit_Sandbox 类所必需)仅可用于 PHP 5.1.0 或 PHP 5.0 的特别修补版本,并需启用线程安全。更多信息可参见 runkit 包中的 README 文件。

参数

code

PHP Code to be lint checked

返回值

成功时返回 TRUE , 或者在失败时返回 FALSE

参见

  • runkit_lint_file() - Check the PHP syntax of the specified file
上一篇: 下一篇: