summaryrefslogtreecommitdiff
path: root/Zend/tests/array_unshift_COW.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/tests/array_unshift_COW.phpt')
-rw-r--r--Zend/tests/array_unshift_COW.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/array_unshift_COW.phpt b/Zend/tests/array_unshift_COW.phpt
new file mode 100644
index 0000000..ecc42bb
--- /dev/null
+++ b/Zend/tests/array_unshift_COW.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Tests that array unshift code is correctly dealing with copy on write and splitting on reference
+--FILE--
+<?php
+ $a=array();
+ $b=1;
+ $c=&$b;
+ array_unshift ($a,$b);
+ $b=2;
+ var_dump ($a);
+?>
+--EXPECT--
+array(1) {
+ [0]=>
+ int(1)
+}