]> granicus.if.org Git - php/commitdiff
Test for #60082
authorXinchen Hui <laruence@php.net>
Wed, 19 Oct 2011 02:28:53 +0000 (02:28 +0000)
committerXinchen Hui <laruence@php.net>
Wed, 19 Oct 2011 02:28:53 +0000 (02:28 +0000)
ext/spl/tests/bug60082.phpt [new file with mode: 0755]

diff --git a/ext/spl/tests/bug60082.phpt b/ext/spl/tests/bug60082.phpt
new file mode 100755 (executable)
index 0000000..f9aa1bd
--- /dev/null
@@ -0,0 +1,14 @@
+--TEST--
+Bug #60082 (100% CPU / when using references with ArrayObject(&$ref))
+--FILE--
+<?php
+$test = array();
+$test = new ArrayObject(&$test);
+$test['a'] = $test['b'];
+?>
+===DONE===
+<?php exit(0); ?>
+--EXPECTF--
+Deprecated: Call-time pass-by-reference has been deprecated in %sbug60082.php on line %d
+
+Fatal error: main(): Array was modified outside object and made a recursive object in %sbug60082.php on line %d