File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
tests /
classes /
__call_005.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 5 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
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>