Annotation of embedaddon/php/Zend/tests/objects_021.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Testing magic methods __set, __get and __call in cascade
3: --FILE--
4: <?php
5:
6: class test {
7: static public $i = 0;
8:
9: public function __construct() {
10: self::$i++;
11: }
12:
13: public function __set($a, $b) {
14: return x();
15: }
16:
17: public function __get($a) {
18: return x();
19: }
20:
21: public function __call($a, $b) {
22: return x();
23: }
24: }
25:
26: function x() {
27: return new test;
28: }
29:
30: x()
31: ->a
32: ->b()
33: ->c = 1;
34:
35: var_dump(test::$i);
36:
37: ?>
38: --EXPECT--
39: int(4)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>