Annotation of embedaddon/php/tests/classes/__call_005.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: When __call() is invoked via ::, ensure private implementation of __call() in superclass is accessed without error.
3: --FILE--
4: <?php
5: class A {
6: private function __call($strMethod, $arrArgs) {
7: echo "In " . __METHOD__ . "($strMethod, array(" . implode(',',$arrArgs) . "))\n";
8: var_dump($this);
9: }
10: }
11:
12: class B extends A {
13: function test() {
14: A::test1(1,'a');
15: B::test2(1,'a');
16: self::test3(1,'a');
17: parent::test4(1,'a');
18: }
19: }
20:
21: $b = new B();
22: $b->test();
23: ?>
24: --EXPECTF--
25: Warning: The magic method __call() must have public visibility and cannot be static in %s__call_005.php on line 3
26: In A::__call(test1, array(1,a))
27: object(B)#1 (0) {
28: }
29: In A::__call(test2, array(1,a))
30: object(B)#1 (0) {
31: }
32: In A::__call(test3, array(1,a))
33: object(B)#1 (0) {
34: }
35: In A::__call(test4, array(1,a))
36: object(B)#1 (0) {
37: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>