1 <?php declare(strict_types=1);
8 * Parses PHP code into a node tree.
10 * @param string $code The source code to parse
11 * @param ErrorHandler|null $errorHandler Error handler to use for lexer/parser errors, defaults
12 * to ErrorHandler\Throwing.
14 * @return Node\Stmt[]|null Array of statements (or null non-throwing error handler is used and
15 * the parser was unable to recover from an error).
17 public function parse(string $code, ErrorHandler $errorHandler = null);