php-parser icon indicating copy to clipboard operation
php-parser copied to clipboard

Bug with encapsed strings

Open i582 opened this issue 3 years ago • 1 comments

PHP Version

7.4 and 8.0

Code Example

"$property->name[]";

Actual Behavior

==> syntax error: unexpected '[' at line 2

Expected Behavior

No error.

i582 avatar Aug 16 '21 19:08 i582

"$a[10]: some"       is $a[10] . ": some"
"$a->prop[10]: some" is $a->prop . "[10]: some"

i582 avatar Aug 16 '21 19:08 i582