xref: /PHP-7.1/tests/lang/bug23624.phpt (revision 97fe15db)
1--TEST--
2Bug #23624 (foreach leaves current array key as null)
3--FILE--
4<?php
5    $arr = array ('one', 'two', 'three');
6    var_dump(current($arr));
7    foreach($arr as $key => $value);
8    var_dump(current($arr));
9?>
10--EXPECT--
11string(3) "one"
12string(3) "one"
13