note 117599 added to reflectionclass.newinstanceargs

From: Date: Sat, 04 Jul 2015 15:06:37 +0000
Subject: note 117599 added to reflectionclass.newinstanceargs
Groups: php.notes 
Request: Send a blank email to php-notes+get-203044@lists.php.net to get a copy of this message
With PHP 5.6, we can use the ... (T_ELLIPSIS) operator <?php class Test { public function __construct($a, $b) { echo $a . ' ' . $b; } } $args = array(12, 34); new Test(... $args); // Displays "12 34" ?> ---- Server IP: 193.19.243.212 Probable Submitter: 193.19.243.212 (proxied: 82.241.75.215) ---- Manual Page -- http://php.net/manual/en/reflectionclass.newinstanceargs.php Edit -- https://master.php.net/note/edit/117599 Del: integrated -- https://master.php.net/note/delete/117599/integrated Del: useless -- https://master.php.net/note/delete/117599/useless Del: bad code -- https://master.php.net/note/delete/117599/bad+code Del: spam -- https://master.php.net/note/delete/117599/spam Del: non-english -- https://master.php.net/note/delete/117599/non-english Del: in docs -- https://master.php.net/note/delete/117599/in+docs Del: other reasons-- https://master.php.net/note/delete/117599 Reject -- https://master.php.net/note/reject/117599 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#203044) next »