summaryrefslogtreecommitdiff
path: root/ext/spl/tests/bug60082.phpt
diff options
context:
space:
mode:
authorOndřej Surý <ondrej@sury.org>2012-01-11 15:43:42 +0100
committerOndřej Surý <ondrej@sury.org>2012-01-11 15:43:42 +0100
commit8f1428d29ef91d74b4d272af171675f2971eb15b (patch)
treea1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext/spl/tests/bug60082.phpt
parentc6e4182351e0173fe58de141e143aac2eacf5efe (diff)
downloadphp-upstream/5.3.9.tar.gz
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext/spl/tests/bug60082.phpt')
-rwxr-xr-xext/spl/tests/bug60082.phpt21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/spl/tests/bug60082.phpt b/ext/spl/tests/bug60082.phpt
new file mode 100755
index 000000000..7aff2c416
--- /dev/null
+++ b/ext/spl/tests/bug60082.phpt
@@ -0,0 +1,21 @@
+--TEST--
+Bug #60082 (100% CPU / when using references with ArrayObject(&$ref))
+--SKIPIF--
+<?php
+if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
+if ((stristr(PHP_OS, 'freebsd'))) {
+ die('skip.. this test causes the run-tests.php to hang on Freebsd, see #60186');
+}
+?>
+--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