Article View: php.doc.bugs
Article #1[DOC-BUGS] Doc #80196 [Csd]: Hard to find documentation on argument unpacking
From: "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
Technical Details
Message-ID:
<E1u8KzA-006xhu-0Y@bugs.php.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!news.php.netReferences:
<bug-80196@bugs.php.net>Show Full Headers
Complete Article Headers
Message-ID: <E1u8KzA-006xhu-0Y@bugs.php.net>
Subject: [DOC-BUGS] Doc #80196 [Csd]: Hard to find documentation on argument unpacking
Date: Fri, 25 Apr 2025 15:29:04 +0000
From: php-bugs@lists.php.net ("yohan at ylab dot nl")
References: <bug-80196@bugs.php.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!news.php.net
Newsgroups: php.doc.bugs
X-Original-To: doc-bugs@lists.php.net
Delivered-To: doc-bugs@lists.php.net
Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5])
by qa.php.net (Postfix) with ESMTPS id EEC071A00BC
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.php.net;
s=mail; t=1745594817;
bh=JxCas9js5c/M1gW372xyl6V70kV2V6WRRx0Q75wYxPE=;
h=To:Subject:From:In-Reply-To:Date:From;
b=K1iWoyVZf/y0Yqu5HCLyXpYAR5/mZnEHyT8xURXo8vW8ygK1W9xD4q4wR7mtvlWxv
TdN1pw14dJ8r+O9hoT8PMJRYaoFTP0R5EV86BgCGsyHG6p462c0Dey+PTpaqDeNWJ5
YQZparhR9LsPZXNd4bs2DdRGDxR6Nn/ydDOrvh2IOHWiAEuCGQ6DmKFbcyXSALpjGV
bqW0yRf4NLz7r2AMSLDJDdTNB5nn3nf5LE4El1G2tu0lDQIbM5VFj8MG+DXlKEklOp
wXvFknIwhEp81+mDh8O6en37EC3hamE6qpKZllnVc6wwQWFlUjrr4PPChqEWAwyNqd
Mk0pExNxpHfKA==
Received: from php-smtp4.php.net (localhost [127.0.0.1])
by php-smtp4.php.net (Postfix) with ESMTP id C90B5180047;
X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net
X-Spam-Status: No, score=-94.5 required=5.0 tests=BAYES_50,DMARC_NONE,
RDNS_NONE,SPF_HELO_NONE,SPF_SOFTFAIL,USER_IN_WELCOMELIST autolearn=no
autolearn_force=no version=4.0.0
X-Spam-Virus: Error (Cannot connect to unix socket
'/var/run/clamav/clamd.ctl': connect: Connection refused)
X-Envelope-From: <noreply@php.net>
Received: from bugs.php.net (unknown [206.189.200.141])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256)
(No client certificate requested)
by php-smtp4.php.net (Postfix) with ESMTPS;
Received: from www-data by bugs.php.net with local (Exim 4.96)
(envelope-from <noreply@php.net>)
id 1u8KzA-006xhu-0Y;
To: doc-bugs@lists.php.net, vrana@php.net
X-PHP-Bug: 80196
X-PHP-Site: PHP
X-PHP-Type: Documentation Problem
X-PHP-Version: Irrelevant
X-PHP-Category: *General Issues
X-PHP-OS: Irrelevant
X-PHP-Status: Closed
X-PHP-Old-Status: Closed
In-Reply-To: <bug-80196@bugs.php.net>
Precedence: bulk
List-help: <mailto:doc-bugs+help@lists.php.net
List-unsubscribe: <mailto:doc-bugs+unsubscribe@lists.php.net>
List-post: <mailto:doc-bugs@lists.php.net>
List-Id: doc-bugs.lists.php.net