note 103499 added to reflectionclass.newinstanceargs
| From: | Anonymous at osu1 dot php dot net | Date: | Fri, 15 Apr 2011 21:29:14 +0000 |
| Subject: | note 103499 added to reflectionclass.newinstanceargs | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-178904@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 69.147.83.197
Probable Submitter: 88.78.20.49
----
Manual Page -- http://www.php.net/manual/en/reflectionclass.newinstanceargs.php
Edit -- https://master.php.net/note/edit/103499
Del: integrated -- https://master.php.net/note/delete/103499/integrated
Del: useless -- https://master.php.net/note/delete/103499/useless
Del: bad code -- https://master.php.net/note/delete/103499/bad+code
Del: spam -- https://master.php.net/note/delete/103499/spam
Del: non-english -- https://master.php.net/note/delete/103499/non-english
Del: in docs -- https://master.php.net/note/delete/103499/in+docs
Del: other reasons-- https://master.php.net/note/delete/103499
Reject -- https://master.php.net/note/reject/103499
Search -- https://master.php.net/manage/user-notes.php