Méthode | Description | |
---|---|---|
parse ( string $code, phpparser\ErrorHandler $errorHandler = null ) : phpparser\Node[] | null | 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. |
Résultat | phpparser\Node[] | null | Array of statements (or null if the 'throwOnError' option is disabled and the parser was unable to recover from an error). |