public
parse(string $code, ErrorHandler|null $errorHandler = null): Stmt[]|null
Parses PHP code into a node tree.
The source code to parse
Error handler to use for lexer/parser errors, defaults to ErrorHandler\Throwing.
Array of statements (or null non-throwing error handler is used and the parser was unable to recover from an error).
PhpParser\ParserAbstract::parse()
PhpParser\Parser\Multiple::parse()
PHPStan\BetterReflection\SourceLocator\Ast\Parser\MemoizingParser::parse()