Skip to content

Commit 0926e00

Browse files
committed
Fix & pattern for rhs bindings
1 parent b750977 commit 0926e00

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Zend/tests/pattern_matching/is/binding_destruct.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ var_dump($bar);
2525
--EXPECT--
2626
Here
2727
int(42)
28-
string(3) "bar"
28+
int(42)

Zend/zend_language_parser.y

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1355,6 +1355,7 @@ or_pattern:
13551355

13561356
and_pattern:
13571357
pattern T_AMPERSAND_NOT_FOLLOWED_BY_VAR_OR_VARARG pattern { $$ = zend_ast_create(ZEND_AST_AND_PATTERN, $1, $3); }
1358+
| pattern T_AMPERSAND_FOLLOWED_BY_VAR_OR_VARARG pattern { $$ = zend_ast_create(ZEND_AST_AND_PATTERN, $1, $3); }
13581359
;
13591360

13601361
range_pattern:

0 commit comments

Comments
 (0)