php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #73311 "...$args" improvement: using in calls syntax
Submitted: 2016-10-13 08:00 UTC Modified: 2016-10-13 08:08 UTC
From: konstmih at gmail dot com Assigned:
Status: Duplicate Package: Class/Object related
PHP Version: Next Major Version OS:
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: konstmih at gmail dot com
New email:
PHP Version: OS:

 

 [2016-10-13 08:00 UTC] 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) { ... }
}


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-10-13 08:08 UTC] requinix@php.net
-Status: Open +Status: Duplicate
 [2016-10-13 08:08 UTC] requinix@php.net
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.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jun 02 18:01:26 2025 UTC