note 103041 deleted from function.call-user-func-array by cmb
| From: | cmb@php.net | Date: | Sun, 30 Aug 2015 18:03:31 +0000 |
| Subject: | note 103041 deleted from function.call-user-func-array by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-203512@lists.php.net to get a copy of this message | ||
Note Submitter: tracid2008 AT googlemail.com
----
I think a better solution is to use ReflectionClass instead of call_user_func_array:
<?php
$rc = new ReflectionClass('SomeClass');
$class = $rc->newInstanceArgs(array('foo', 'bar'));
echo $class->doSomething();
?>