mirror of
https://github.com/php/php-src.git
synced 2024-12-15 12:54:57 +08:00
f545ee2c6c
RFC: https://wiki.php.net/rfc/trailing_comma_in_parameter_list Closes GH-5306.
47 lines
510 B
PHP
47 lines
510 B
PHP
--TEST--
|
|
Trailing comma in function signatures
|
|
--FILE--
|
|
<?php
|
|
|
|
function test(
|
|
$there,
|
|
$are,
|
|
$many,
|
|
$params,
|
|
) {
|
|
echo "Foo\n";
|
|
}
|
|
|
|
class Test {
|
|
public function method(
|
|
$there,
|
|
$are,
|
|
$many,
|
|
$params,
|
|
) {
|
|
echo "Foo\n";
|
|
}
|
|
}
|
|
|
|
$func = function(
|
|
$there,
|
|
$are,
|
|
$many,
|
|
$params,
|
|
) {
|
|
echo "Foo\n";
|
|
};
|
|
|
|
$func = fn(
|
|
$there,
|
|
$shouldnt,
|
|
$be,
|
|
$many,
|
|
$params,
|
|
) => print "Foo\n";
|
|
|
|
?>
|
|
===DONE===
|
|
--EXPECT--
|
|
===DONE===
|