runkit_lint

(PECL)

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 commandline except runkit_lint() accepts actual code rather than a filename.

注: 對沙盒的支援(是函數 runkit_lint()runkit_lint_file() 和 Runkit_Sandbox 類所必須的)僅在 PHP 5.1 中,或在加過特別修改更新的 PHP 5.0 中,並需要啟用執行緒安全。請閱讀 runkit 包中的 README 檔案以瞭解更多訊息。

參數

code

PHP Code to be lint checked

返回值

若果成功則返回 TRUE,失敗則返回 FALSE