summaryrefslogtreecommitdiff
path: root/Zend/tests/bug66609.phpt
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2015-03-10 15:36:42 +0800
committerXinchen Hui <laruence@php.net>2015-03-10 15:36:42 +0800
commit6a6c273893178bb9b59c117e31761fe0193d0c9f (patch)
treeb111936dc8210d4161f659c7f01bfbf560a0b99b /Zend/tests/bug66609.phpt
parent22894e74c2b04d0506645059c2ffa776cf0ace45 (diff)
downloadphp-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.phpt27
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