From 8598240c69801479cef134bac29b12c233aca075 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Thu, 22 Mar 2018 16:37:34 +0300 Subject: Fixed a behavior break introduced by d7f2dc4ec651628e10213625db6aee3559e214a9 --- ext/standard/tests/array/current_variation6.phpt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 ext/standard/tests/array/current_variation6.phpt (limited to 'ext') diff --git a/ext/standard/tests/array/current_variation6.phpt b/ext/standard/tests/array/current_variation6.phpt new file mode 100644 index 0000000000..970c7d4045 --- /dev/null +++ b/ext/standard/tests/array/current_variation6.phpt @@ -0,0 +1,20 @@ +--TEST-- +Test current() function : internal pointer maintenance at the end of array +--FILE-- + 1, "bar" => 2, "baz" => 3]; +reset($array); +while ($cur = current($array)) { + var_dump($cur); + next($array); +} + +unset($array["baz"]); +$array[] = 4; +var_dump(current($array)); +?> +--EXPECT-- +int(1) +int(2) +int(3) +int(4) -- cgit v1.2.1