You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can submit a PR if you think it is a good change. But I have two things unsure:
I do not have the PHP 5, is [,] legal in php 5?
The definition of array_pair effects the definition of dereferencable_scalar. Can I know what dereferencable_scalar is? Then I can test whether the new definition affects dereferencable_scalar rightly.
Happy Holiday,
Jinxuan Zhu
The text was updated successfully, but these errors were encountered:
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 checkArray() method to the ParserAbstract class, which (recursively) checks for null elements and generates the same "Cannot use empty array elements in arrays" error message as PHP does. checkArray() would then be called from dereferencable_scalar.
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: