Req #73311 [Opn->Dup]: "...$args" improvement: using in calls syntax
| From: | requinix@php.net | Date: | Thu, 13 Oct 2016 08:08:42 +0000 |
| Subject: | Req #73311 [Opn->Dup]: "...$args" improvement: using in calls syntax | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-204660@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=73311&edit=1
ID: 73311
Updated by: requinix@php.net
Reported by: konstmih at gmail dot com
Summary: "...$args" improvement: using in calls syntax
-Status: Open
+Status: Duplicate
Type: Feature/Change Request
Package: Class/Object related
PHP Version: Next Major Version
Block user comment: N
Private report: N
New Comment:
http://php.net/manual/en/functions.arguments.php#functions.variable-arg-list
It works, so if your code doesn't then you have a different problem.
Previous Comments:
------------------------------------------------------------------------
[2016-10-13 08:00:20] konstmih at gmail dot com
Description:
------------
Please add using of "...$var" syntax in function calls
Test script:
---------------
$array = [1,2,3];
$class->func1(...$array);
class Class {
function func1($a, $b, $c) { ... }
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=73311&edit=1