Annotation of embedaddon/php/Zend/tests/lsb_016.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: ZE2 Late Static Binding within hooks/magic methods
3: --FILE--
4: <?php
5:
6: class TestChild extends TestParent {
7:
8: public static function who() {
9: echo __CLASS__."\n";
10: }
11: }
12:
13: class TestParent {
14:
15: public function __get($var) {
16: static::who();
17: }
18:
19: public function __set($var, $val) {
20: static::who();
21: }
22:
23: public function __call($name, $args) {
24: static::who();
25: }
26:
27: public static function who() {
28: echo __CLASS__."\n";
29: }
30: }
31: $o = new TestChild;
32: $o->test();
33: $o->a = "b";
34: echo $o->a;
35: ?>
36: ==DONE==
37: --EXPECTF--
38: TestChild
39: TestChild
40: TestChild
41: ==DONE==
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>