Thread View: php.doc.bugs
1 messages
1 total messages
Started by "yohan at ylab dot nl"
Fri, 25 Apr 2025 15:29
[DOC-BUGS] Doc #80196 [Csd]: Hard to find documentation on argument unpacking
Author: "yohan at ylab dot nl"
Date: Fri, 25 Apr 2025 15:29
Date: Fri, 25 Apr 2025 15:29
57 lines
5028 bytes
5028 bytes
Edit report at https://bugs.php.net/bug.php?id=80196&edit=1 ID: 80196 User updated by: yohan at ylab dot nl Reported by: yohan at ylab dot nl Summary: Hard to find documentation on argument unpacking Status: Closed Type: Documentation Problem Package: *General Issues Operating System: Irrelevant PHP Version: Irrelevant Assigned To: vrana Block user comment: N Private report: N New Comment: @Vrana: the url you post is one of the places where the ... token is mentioned, as I wrote in the initial description. But using the ... token for a variable-length function argument is just one use case. Other uses of the ... token are not documented, unlike most other operators (https://www.php.net/manual/en/language.operators.php). Previous Comments: ------------------------------------------------------------------------ [2025-04-25 14:22:06] vrana@php.net https://www.php.net/functions.arguments#functions.variable-arg-list ------------------------------------------------------------------------ [2024-07-10 05:53:11] krina234pestro at outlook dot com This feature is particularly useful when you have a list of arguments in an array and you want to pass them to a function without manually indexing each element.(https://github.com)(https://www-lhiproviderportal.com) ------------------------------------------------------------------------ [2020-10-07 10:18:08] yohan at ylab dot nl Description: ------------ I find it hard to find reference documentation on argument unpacking, aka the spread operator, aka the splat operator, aka the ... operator, aka the ... token. It's mentioned as new feature on several places: https://www.php.net/manual/en/migration56.new-features.php https://www.php.net/manual/en/migration74.new-features.php https://www.php.net/manual/en/functions.arguments.php#functions.variable-arg-list.new I would appreciate a complete reference page on argument unpacking, with examples and version info (comparable to https://www.php.net/manual/en/language.operators.errorcontrol.php). ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=80196&edit=1
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads