1--TEST--
2Test current() function : internal pointer maintenance at the end of array
3--FILE--
4<?php
5$array = ["foo" => 1, "bar" => 2, "baz" => 3];
6reset($array);
7while ($cur = current($array)) {
8    var_dump($cur);
9    next($array);
10}
11
12unset($array["baz"]);
13$array[] = 4;
14var_dump(current($array));
15?>
16--EXPECT--
17int(1)
18int(2)
19int(3)
20int(4)
21