@@ -37,12 +37,12 @@ Usage
37
37
38
38
Code can be parsed using either ` ast\parse_code() ` , which accepts a code string, or
39
39
` ast\parse_file() ` , which accepts a file path. Additionally both functions require a ` $version `
40
- argument to ensure forward-compatibility. The current version is 35 .
40
+ argument to ensure forward-compatibility. The current version is 40 .
41
41
42
42
``` php
43
- $ast = ast\parse_code('<?php ...', $version=35 );
43
+ $ast = ast\parse_code('<?php ...', $version=40 );
44
44
// or
45
- $ast = ast\parse_file('file.php', $version=35 );
45
+ $ast = ast\parse_file('file.php', $version=40 );
46
46
```
47
47
48
48
The abstract syntax tree returned by these functions consists of ` ast\Node ` objects.
@@ -100,7 +100,7 @@ $code = <<<'EOC'
100
100
$var = 42;
101
101
EOC;
102
102
103
- var_dump(ast\parse_code($code, $version=35 ));
103
+ var_dump(ast\parse_code($code, $version=40 ));
104
104
105
105
// Output:
106
106
object(ast\Node)#1 (4) {
@@ -157,7 +157,7 @@ $code = <<<'EOC'
157
157
$var = 42;
158
158
EOC;
159
159
160
- echo ast_dump(ast\parse_code($code, $version=35 )), "\n";
160
+ echo ast_dump(ast\parse_code($code, $version=40 )), "\n";
161
161
162
162
// Output:
163
163
AST_STMT_LIST
@@ -424,7 +424,9 @@ ZEND_AST_USE
424
424
Version changelog
425
425
-----------------
426
426
427
- ### 40 (in development)
427
+ ### 40 (current)
428
+
429
+ Supported since 2017-01-18.
428
430
429
431
* ` AST_COALESCE ` is now represented as an ` AST_BINARY_OP ` with flag ` BINARY_COALESCE ` .
430
432
* For ` AST_NAME ` nodes with ` NAME_FQ ` the leading backslash is now dropped if syntax like
@@ -438,7 +440,7 @@ Version changelog
438
440
These will now be normalized to always use an ` AST_STMT_LIST ` . A ` null ` is only allowed if it is
439
441
semantically meaningful, e.g. in the case of ` declare(ticks=1); ` vs ` declare(ticks=1) {} ` .
440
442
441
- ### 35 (current )
443
+ ### 35 (supported )
442
444
443
445
Supported since 2016-08-04.
444
446
0 commit comments