summaryrefslogtreecommitdiff
path: root/Zend/tests/bug66609.phpt
blob: f8c0d9ce67e4dafc21e43548c4eaf83aa2bcef27 (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
26
27
28
--TEST--
Bug #66609 (php crashes with __get() and ++ operator in some cases)
--FILE--
<?php
$bar = new Bar;
$foo = new Foo;
class Bar {
    public function __get($x) {
        global $foo;
        return $foo->foo;
    }
}
class Foo {
    public function __get($x) {
        global $bar;
        return $bar->bar;
    }
}
$foo->blah += 1; //crash
++$foo->blah;    //crash
$foo->blah++;    //crash
$foo->blah--;    //crash
--$foo->blah;    //crash
echo "okey";
?>
--EXPECTF--
Warning: Undefined property: Bar::$bar in %s on line %d
okey