2015-03-10 15:36:42 +08:00
|
|
|
--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";
|
|
|
|
?>
|
2015-03-10 17:05:47 +08:00
|
|
|
--EXPECTF--
|
|
|
|
Notice: Undefined property: Bar::$bar in %sbug66609.php on line %d
|
2015-03-10 15:36:42 +08:00
|
|
|
okey
|