xref: /PHP-7.4/ext/standard/tests/array/bug75433.phpt (revision cc96166f)
1--TEST--
2array_values() preserves next index from source array when shallow-copying
3--FILE--
4<?php
5
6$a = [1,2,3];
7unset($a[2]);
8$b = array_values($a);
9$b[] = 4;
10print_r($b);
11--EXPECT--
12Array
13(
14    [0] => 1
15    [1] => 2
16    [2] => 4
17)
18