php/php-langspec

isset variable list may include trialing ','

zhujinxuan opened this issue · 3 comments

In php 7.3.0, isset is legal for the following code:

isset($a,);

screenshot 2018-12-20 17 00 06

However, the isset variable list is defined by

isset-intrinsic:
   isset   (   variable-list   )

variable-list:
   variable
   variable-list   ,   variable

in 10-expression.md.

If we plan to make the spec consistent with current PHP, I can submit a PR to change it as

isset-intrinsic:
   isset   (   isset-variable-list  ','? )

variable-list:
   variable
   variable-list   ,   variable
nikic commented

If we plan to make the spec consistent with current PHP, I can submit a PR to change it as

Looks right, please do so :)

@nikic Thank you. Submitted in #229 . Do we need to change tests for the isset behavior?

Merged, Close this issue