New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
array_pair shall not include empty #561
Comments
These grammar productions are shared between array literals (which don't allow empty elements) and array destructuring (which does), so it's not possible to just modify the grammar here. Instead I would suggest to add a |
Hi, it is about a bug we found in psysh bobthecow/psysh#543;
It seems that, in php 7.3 and php7.2, the following syntax is not legal:
which means, at least in
inner_array_pair_list
, we shall not includeempty
as the definition.To fix the problem, and to ensure trialing comma of array still. I think we can:
I can submit a PR if you think it is a good change. But I have two things unsure:
[,]
legal in php 5?array_pair
effects the definition ofdereferencable_scalar
. Can I know whatdereferencable_scalar
is? Then I can test whether the new definition affectsdereferencable_scalar
rightly.Happy Holiday,
Jinxuan Zhu
The text was updated successfully, but these errors were encountered: