Skip to content

Commit c387d50

Browse files
mattschesnikic
authored andcommitted
Add second parameter $version to parse_code()
The method `parse_code()` requires the second parameter `$version`, but it is missing in some examples. The commit fixes this.
1 parent 92c4df6 commit c387d50

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $code = <<<'EOC'
102102
$var = 42;
103103
EOC;
104104

105-
var_dump(ast\parse_code($code));
105+
var_dump(ast\parse_code($code, $version=20));
106106

107107
// Output:
108108
object(ast\Node)#1 (4) {
@@ -159,7 +159,7 @@ $code = <<<'EOC'
159159
$var = 42;
160160
EOC;
161161

162-
echo ast_dump(ast\parse_code($code)), "\n";
162+
echo ast_dump(ast\parse_code($code, $version=20)), "\n";
163163

164164
// Output:
165165
AST_STMT_LIST

0 commit comments

Comments
 (0)