blob: 13ff963d0677ec32617897f6b591cf2ffe208321 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
--TEST--
Bug #48770 (call_user_func_array() fails to call parent from inheriting class)
--FILE--
<?php
class A {
public function func($arg) {
echo "A::func called\n";
}
}
class B extends A {
public function func($arg) {
echo "B::func called\n";
}
public function callFuncInParent($arg) {
call_user_func_array(array($this, 'parent::func'), array($arg));
}
}
class C extends B {
public function func($arg) {
echo "C::func called\n";
parent::func($str);
}
}
$c = new C;
$c->callFuncInParent('Which function will be called??');
?>
--EXPECT--
B::func called
|