diff --git a/README.md b/README.md index abc99fc..81464af 100644 --- a/README.md +++ b/README.md @@ -5,16 +5,17 @@ A Control-Flow-Graph implementation in Pure PHP. ## Usage To bootstrap the parser, you need to give it a `PhpParser` instance: - - $parser = new PHPCfg\Parser( - new PhpParser\Parser(new PhpParser\Lexer) - ); - +```php +$parser = new PHPCfg\Parser( + new PhpParser\Parser(new PhpParser\Lexer) +); +``` Then, just call parse on a block of code, giving it a filename: - - $block = $parser->parse(file_get_contents(__FILE__), __FILE__); - +```php +$block = $parser->parse(file_get_contents(__FILE__), __FILE__); +``` To dump the graph, simply use the built-in dumper: - - $dumper = new PHPCfg\Dumper; - echo $dumper->dump($block); \ No newline at end of file +```php +$dumper = new PHPCfg\Dumper; +echo $dumper->dump($block); +```