Skip to content

Commit e21589b

Browse files
committed
Mark 40 as current version
1 parent 0b1db79 commit e21589b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ Usage
3737

3838
Code can be parsed using either `ast\parse_code()`, which accepts a code string, or
3939
`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.
4141

4242
```php
43-
$ast = ast\parse_code('<?php ...', $version=35);
43+
$ast = ast\parse_code('<?php ...', $version=40);
4444
// or
45-
$ast = ast\parse_file('file.php', $version=35);
45+
$ast = ast\parse_file('file.php', $version=40);
4646
```
4747

4848
The abstract syntax tree returned by these functions consists of `ast\Node` objects.
@@ -100,7 +100,7 @@ $code = <<<'EOC'
100100
$var = 42;
101101
EOC;
102102

103-
var_dump(ast\parse_code($code, $version=35));
103+
var_dump(ast\parse_code($code, $version=40));
104104

105105
// Output:
106106
object(ast\Node)#1 (4) {
@@ -157,7 +157,7 @@ $code = <<<'EOC'
157157
$var = 42;
158158
EOC;
159159

160-
echo ast_dump(ast\parse_code($code, $version=35)), "\n";
160+
echo ast_dump(ast\parse_code($code, $version=40)), "\n";
161161

162162
// Output:
163163
AST_STMT_LIST
@@ -424,7 +424,9 @@ ZEND_AST_USE
424424
Version changelog
425425
-----------------
426426

427-
### 40 (in development)
427+
### 40 (current)
428+
429+
Supported since 2017-01-18.
428430

429431
* `AST_COALESCE` is now represented as an `AST_BINARY_OP` with flag `BINARY_COALESCE`.
430432
* For `AST_NAME` nodes with `NAME_FQ` the leading backslash is now dropped if syntax like
@@ -438,7 +440,7 @@ Version changelog
438440
These will now be normalized to always use an `AST_STMT_LIST`. A `null` is only allowed if it is
439441
semantically meaningful, e.g. in the case of `declare(ticks=1);` vs `declare(ticks=1) {}`.
440442

441-
### 35 (current)
443+
### 35 (supported)
442444

443445
Supported since 2016-08-04.
444446

ast.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#define AST_CACHE_SLOT_LINENO &AST_G(cache_slots)[2 * 2]
2929
#define AST_CACHE_SLOT_CHILDREN &AST_G(cache_slots)[2 * 3]
3030

31-
#define AST_CURRENT_VERSION 35
31+
#define AST_CURRENT_VERSION 40
3232

3333
/* Additional flags for BINARY_OP */
3434
#define AST_BINARY_IS_GREATER 256

0 commit comments

Comments
 (0)