Edit report at http://bugs.php.net/bug.php?id=12771&edit=1
ID: 12771 Updated by: [email protected] Reported by: ron at dmscontrol dot com Summary: new_object_array() -Status: Open +Status: Wont fix Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Linux PHP Version: 4.0.6 Block user comment: N Private report: N New Comment: Can be done in userland code, no need for anything special here. Previous Comments: ------------------------------------------------------------------------ [2001-08-15 14:13:19] ron at dmscontrol dot com I was hoping that the dynamic creation of objects could be extended to support it's parameters in an array format like the functions call_user_method_array and call_user_func_array(). This would be great for test suites. eg function test_suite_object_test($class, $args) { if (!class_exists($class)) error(); else { $obj = new_object_array($class, $args); ... futher tests on the object ... } } This would useful, not having to hard code the constructors parameter list, with obvious limitations, with something like: function test_suite_object_test($class, $arg1, $arg2, $arg3, $arg4) { if (!class_exists($class)) error(); else { $obj = new $class($arg1, $arg2, $arg3, $arg4); ... futher tests on the object ... } } ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=12771&edit=1
