Trailing arguments after argument unpacking no longer allowed
| From: | Nikita Popov | Date: | Wed, 26 Feb 2014 16:00:45 +0000 |
| Subject: | Trailing arguments after argument unpacking no longer allowed | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-72828@lists.php.net to get a copy of this message | ||
Hi internals!
The implementation of the argument unpacking feature added in PHP 5.6
changed insofar that trailing "normal" arguments are no longer allowed
after argument unpacking was used. Both of the following are no longer
valid and will lead to a compile-time error:
fn(...$array, $var);
fn(...$array1, $var, ...$array2);
For more info about this change and the reasons behind it, see
http://git.php.net/?p=php-src.git;a=commitdiff;h=d3b484df8268f7ab31c4ac39734d4b68ce2e6159
.
Hope this change is okay with everybody. That particular aspect of the
feature didn't seem very popular in the first place anyways.
Nikita