Annotation of embedaddon/php/Zend/tests/bug42937.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #42937 (__call() method not invoked when methods are called on parent from child class)
3: --FILE--
4: <?php
5: class A {
6: function __call($strMethod, $arrArgs) {
7: echo "$strMethod\n";
8: }
9: }
10:
11: class C {
12: function __call($strMethod, $arrArgs) {
13: echo "$strMethod\n";
14: }
15: }
16:
17: class B extends A {
18: function test() {
19: self::test1();
20: parent::test2();
21: static::test3();
22: A::test4();
23: B::test5();
24: C::test6();
25: }
26: }
27:
28: $a = new A();
29: $a->test();
30:
31: $b = new B();
32: $b->test();
33: ?>
34: --EXPECTF--
35: test
36: test1
37: test2
38: test3
39: test4
40: test5
41:
42: Fatal error: Call to undefined method C::test6() in %sbug42937.php on line 21
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>