]> granicus.if.org Git - php/commitdiff
This commit was manufactured by cvs2svn to create branch 'PHP_4_3'.
authorSVN Migration <svn@php.net>
Thu, 6 Feb 2003 15:04:54 +0000 (15:04 +0000)
committerSVN Migration <svn@php.net>
Thu, 6 Feb 2003 15:04:54 +0000 (15:04 +0000)
ext/standard/tests/array/bug22088.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/array/bug22088.phpt b/ext/standard/tests/array/bug22088.phpt
new file mode 100644 (file)
index 0000000..827da25
--- /dev/null
@@ -0,0 +1,20 @@
+--TEST--
+Bug #21998 (array_shift() leaves next index to be +1 too much)
+--FILE--
+<?php
+
+$a = array('a', 'b', 'c');
+$last = array_shift ($a);
+$a[] = 'a';
+var_dump($a);
+
+?>
+--EXPECT--
+array(3) {
+  [0]=>
+  string(1) "b"
+  [1]=>
+  string(1) "c"
+  [2]=>
+  string(1) "a"
+}