mirror of
https://github.com/php/php-src.git
synced 2024-11-27 11:53:33 +08:00
4cf8b6f1c9
RFC: https://wiki.php.net/rfc/trailing_comma_in_closure_use_list Discussion: https://externals.io/message/110715 The release manager has agreed to allow merging of RFCs that have near-unanimous votes. If an RFC ends up not achieving the required 2/3 majority at the time the announced voting period closes, this implementation commit will be reverted in time for the feature freeze. Closes GH-5793
18 lines
180 B
PHP
18 lines
180 B
PHP
--TEST--
|
|
Closure use list can have trailing commas
|
|
--FILE--
|
|
<?php
|
|
|
|
$b = 'test';
|
|
$fn = function () use (
|
|
$b,
|
|
&$a,
|
|
) {
|
|
$a = $b;
|
|
};
|
|
$fn();
|
|
echo "$a\n";
|
|
?>
|
|
--EXPECT--
|
|
test
|