PHP 인터페이스 PhpParser\Parser

파일 보기 프로젝트 열기: nikic/php-parser 0 사용 예제들

공개 메소드들

메소드 설명
parse ( string $code, phpparser\ErrorHandler $errorHandler = null ) : phpparser\Node[] | null Parses PHP code into a node tree.

메소드 상세

parse() 공개 메소드

Parses PHP code into a node tree.
public parse ( string $code, phpparser\ErrorHandler $errorHandler = null ) : phpparser\Node[] | null
$code string The source code to parse
$errorHandler phpparser\ErrorHandler Error handler to use for lexer/parser errors, defaults to ErrorHandler\Throwing.
리턴 phpparser\Node[] | null Array of statements (or null if the 'throwOnError' option is disabled and the parser was unable to recover from an error).