From 391892282a7bd5b3b879d185f247d0c6d6bfe0d3 Mon Sep 17 00:00:00 2001 From: Lorenzo Fontana <fontanalorenzo@me.com> Date: Sun, 16 Aug 2015 16:22:05 +0200 Subject: [PATCH] Use PhpParser\ParserFactory in readme example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5905c30..de3bc2f 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,8 @@ A Control-Flow-Graph implementation in Pure PHP. To bootstrap the parser, you need to give it a `PhpParser` instance: ```php $parser = new PHPCfg\Parser( - new PhpParser\Parser(new PhpParser\Lexer) -); + (new PhpParser\ParserFactory)->create(PhpParser\ParserFactory::PREFER_PHP7) +); ``` Then, just call parse on a block of code, giving it a filename: ```php