Doc #80196 [Csd]: Hard to find documentation on argument unpacking

From: Date: Fri, 25 Apr 2025 15:29:04 +0000
Subject: Doc #80196 [Csd]: Hard to find documentation on argument unpacking
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-19733@lists.php.net to get a copy of this message
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

« previous php.doc.bugs (#19733) next »