call_user_func_array — Call a callback with an array of parameters
Calls the callback given by the first parameter with the parameters in param_arr.
Returns the return value of the callback, or FALSE on error.
<?php
class Test {
public function __call($name, $args){
call_user_func_array(array('static', "test$name"), $args);
}
public function testS($l) {
echo "$l,";
}
}
class Test2 extends Test {
public function testS($l) {
echo "$l,$l,";
}
}
$test = new Test2();
$test->S('A');
?>