summaryrefslogtreecommitdiff
path: root/Zend/tests/bug67985.phpt
diff options
context:
space:
mode:
authorTjerk Meesters <datibbaw@php.net>2014-09-09 17:58:45 +0800
committerTjerk Meesters <datibbaw@php.net>2014-09-09 17:58:45 +0800
commit99f0760bfba86f45af9ea011a0f017080922710a (patch)
tree87b383548e133ee5560bee70e80bf824184f7802 /Zend/tests/bug67985.phpt
parentd2e1a04b1011e15321b9748f76620786418b7893 (diff)
downloadphp-git-99f0760bfba86f45af9ea011a0f017080922710a.tar.gz
Fixed #67985 - Incorrect last used array index copied to new array after unset
In master zend_array_dup() is used to do this properly; this is a workaround.
Diffstat (limited to 'Zend/tests/bug67985.phpt')
-rw-r--r--Zend/tests/bug67985.phpt16
1 files changed, 16 insertions, 0 deletions
diff --git a/Zend/tests/bug67985.phpt b/Zend/tests/bug67985.phpt
new file mode 100644
index 0000000000..6f032643f4
--- /dev/null
+++ b/Zend/tests/bug67985.phpt
@@ -0,0 +1,16 @@
+--TEST--
+Bug #67985 - Last used array index not copied to new array at assignment
+--FILE--
+<?php
+
+$a = ['zero', 'one', 'two'];
+unset($a[2]);
+$b = $a;
+$a[] = 'three';
+$b[] = 'three';
+
+var_dump($a === $b);
+
+?>
+--EXPECT--
+bool(true)