]> granicus.if.org Git - php/commitdiff
MFB
authorfoobar <sniper@php.net>
Wed, 14 May 2003 15:02:30 +0000 (15:02 +0000)
committerfoobar <sniper@php.net>
Wed, 14 May 2003 15:02:30 +0000 (15:02 +0000)
tests/lang/bug23624.phpt [new file with mode: 0644]

diff --git a/tests/lang/bug23624.phpt b/tests/lang/bug23624.phpt
new file mode 100644 (file)
index 0000000..81afefb
--- /dev/null
@@ -0,0 +1,12 @@
+--TEST--
+Bug #23624 (foreach leaves current array key as null)
+--FILE--
+<?php
+    $arr = array ('one', 'two', 'three');
+    var_dump(current($arr));
+    foreach($arr as $key => $value);
+    var_dump(current($arr));
+?>
+--EXPECT--
+string(3) "one"
+string(5) "three"