blob: 5706a7c004b54b97b35d04aefaefc3adf26b41a6 (
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
|
--TEST--
When __call() is invoked via ::, ensure private implementation of __call() in superclass is accessed without error.
--FILE--
<?php
class A {
private function __call($strMethod, $arrArgs) {
echo "In " . __METHOD__ . "($strMethod, array(" . implode(',',$arrArgs) . "))\n";
var_dump($this);
}
}
class B extends A {
function test() {
A::test1(1,'a');
B::test2(1,'a');
self::test3(1,'a');
parent::test4(1,'a');
}
}
$b = new B();
$b->test();
?>
--EXPECTF--
Fatal error: The magic method __call() must have public visibility and can not be static in %s on line %d
|