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

Missing Information on Spread Operator and Array/Argument Unpacking #2769

Open
Sunthief opened this issue Sep 16, 2023 · 0 comments
Open

Missing Information on Spread Operator and Array/Argument Unpacking #2769

Sunthief opened this issue Sep 16, 2023 · 0 comments

Comments

@Sunthief
Copy link

From manual page: https://php.net/language.operators


I noticed that there is not a lot of information on the spread operator and the variadic argument token/operator in the operator section .
There is more information on array unpacking on the data type, array page: https://www.php.net/manual/en/language.types.array.php#language.types.array.unpacking, but almost nothing on argument unpacking in the function section: https://www.php.net/manual/en/functions.arguments.php#functions.named-arguments
I think it would make sense to add the spread operator in the operator section with information on array and argument unpacking, which can currently only be found in the rfc section:

It is probably very useful to know that argument unpacking works with named arguments. I also missed anything on the fact that you cannot use argument unpacking after named arguments, that is not mentioned even in the rfc seciton.

The variadic function parameter token/operator is not quite the same thing, but should also be mentioned here, I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant