note 103499 deleted from reflectionclass.newinstanceargs by danbrown

From: Date: Fri, 15 Apr 2011 22:27:01 +0000
Subject: note 103499 deleted from reflectionclass.newinstanceargs by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-178905@lists.php.net to get a copy of this message
Note Submitter: Anonymous ---- kevinpeno at gmail com wrote: This function is equivilant to call_user_func_array() while Reflection::newInstance() is equivilant to call_user_func() This is wrong! if you're about to pass arguments to the constructor, you maybe use '__construct' to call_user_func_array. But, the requested class will be FIRST instanciated and THEN the method __construct will be called. So you can't use call_user_func_array when the constructor is expecting some variables.

« previous php.notes (#178905) next »