xref: /PHP-8.4/ext/standard/tests/array/bug75433.phpt (revision 7aacc705)
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?>
12--EXPECT--
13Array
14(
15    [0] => 1
16    [1] => 2
17    [2] => 4
18)
19