Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trailing comma in closure use list #38

Closed
Tracked by #1 ...
i582 opened this issue Jul 30, 2021 · 0 comments
Closed
Tracked by #1 ...

Trailing comma in closure use list #38

i582 opened this issue Jul 30, 2021 · 0 comments
Labels
PHP 8 PHP 8 features

Comments

@i582
Copy link
Owner

i582 commented Jul 30, 2021

RFC: https://wiki.php.net/rfc/trailing_comma_in_closure_use_list

Example:

$longArgs_longVars = function (
    $longArgument,
    $longerArgument,
    $muchLongerArgument,  // Trailing commas were allowed in parameter lists in PHP 8.0
) use (
    $longVar1,
    $longerVar2,
    $muchLongerVar3, // <- comma
) {
   // body
};
$longArgs_longVars(
    $longArgumentValue,
    $obj->longMethodCall(),
    $obj->longPropertyName ?? $longDefault,
);
@i582 i582 mentioned this issue Jul 30, 2021
Closed
17 tasks
@i582 i582 added the PHP 8 PHP 8 features label Jul 30, 2021
@i582 i582 closed this as completed Jul 30, 2021
@i582 i582 mentioned this issue Jul 30, 2021
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PHP 8 PHP 8 features
Projects
None yet
Development

No branches or pull requests

1 participant