What is the output of the following code?
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');
- A,
- A, A,
- A, A, A,
- PHP Warning: call_user_func_array() expects parameter 1 to be a valid callback
Reveal Solution
Next Question