diff options
author | Xinchen Hui <laruence@php.net> | 2015-03-10 15:36:42 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2015-03-10 15:36:42 +0800 |
commit | 6a6c273893178bb9b59c117e31761fe0193d0c9f (patch) | |
tree | b111936dc8210d4161f659c7f01bfbf560a0b99b /Zend/tests/bug66609.phpt | |
parent | 22894e74c2b04d0506645059c2ffa776cf0ace45 (diff) | |
download | php-git-6a6c273893178bb9b59c117e31761fe0193d0c9f.tar.gz |
Fixed bug #66609 (php crashes with __get() and ++ operator in some cases)
Diffstat (limited to 'Zend/tests/bug66609.phpt')
-rw-r--r-- | Zend/tests/bug66609.phpt | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Zend/tests/bug66609.phpt b/Zend/tests/bug66609.phpt new file mode 100644 index 0000000000..e156000ae1 --- /dev/null +++ b/Zend/tests/bug66609.phpt @@ -0,0 +1,27 @@ +--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"; +?> +--EXPECT-- +okey |