{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/4940","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/4940/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/4940/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/4940/events","html_url":"https://github.com/facebook/hhvm/issues/4940","id":59668299,"number":4940,"title":"Allow unpacking multiple arguments","user":{"login":"mpajunen","id":7025066,"avatar_url":"https://avatars.githubusercontent.com/u/7025066?v=3","gravatar_id":"","url":"https://api.github.com/users/mpajunen","html_url":"https://github.com/mpajunen","followers_url":"https://api.github.com/users/mpajunen/followers","following_url":"https://api.github.com/users/mpajunen/following{/other_user}","gists_url":"https://api.github.com/users/mpajunen/gists{/gist_id}","starred_url":"https://api.github.com/users/mpajunen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpajunen/subscriptions","organizations_url":"https://api.github.com/users/mpajunen/orgs","repos_url":"https://api.github.com/users/mpajunen/repos","events_url":"https://api.github.com/users/mpajunen/events{/privacy}","received_events_url":"https://api.github.com/users/mpajunen/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/php5%20incompatibility","name":"php5 incompatibility","color":"837ced"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-03T16:38:48Z","updated_at":"2015-05-14T03:44:16Z","closed_at":null,"body":"PHP (5.6+) allows unpacking multiple arguments, HHVM only allows unpacking for the last argument. For example, the following does not work:\r\n```php\r\nfunction add($a, $b, $c, $d)\r\n{\r\n    echo $a + $b + $c + $d;\r\n}\r\n\r\nadd(...[2, 3], ...[4, 5]);\r\n```\r\n\r\nhttp://3v4l.org/lLuMG"},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/101900357","html_url":"https://github.com/facebook/hhvm/issues/4940#issuecomment-101900357","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/4940","id":101900357,"user":{"login":"morrisonlevi","id":253316,"avatar_url":"https://avatars.githubusercontent.com/u/253316?v=3","gravatar_id":"","url":"https://api.github.com/users/morrisonlevi","html_url":"https://github.com/morrisonlevi","followers_url":"https://api.github.com/users/morrisonlevi/followers","following_url":"https://api.github.com/users/morrisonlevi/following{/other_user}","gists_url":"https://api.github.com/users/morrisonlevi/gists{/gist_id}","starred_url":"https://api.github.com/users/morrisonlevi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/morrisonlevi/subscriptions","organizations_url":"https://api.github.com/users/morrisonlevi/orgs","repos_url":"https://api.github.com/users/morrisonlevi/repos","events_url":"https://api.github.com/users/morrisonlevi/events{/privacy}","received_events_url":"https://api.github.com/users/morrisonlevi/received_events","type":"User","site_admin":false},"created_at":"2015-05-14T03:44:16Z","updated_at":"2015-05-14T03:44:16Z","body":"I expect anyone doing functional programming in PHP will attempt to write a function like the following since PHP 5.6:\r\n\r\n```php\r\nfunction bind(callable $fn, ...$bound) {\r\n    return function(...$params) use($fn, $bound) {\r\n        return $fn(...$bound, ...$params);\r\n    };\r\n}\r\n```"}}