summaryrefslogtreecommitdiff
path: root/ext/standard/tests/array/bug75433.phpt
blob: 650c6ca378a087f3b07eeba43d2851bca9835489 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
--TEST--
array_values() preserves next index from source array when shallow-copying
--FILE--
<?php

$a = [1,2,3];
unset($a[2]);
$b = array_values($a);
$b[] = 4;
print_r($b);
--EXPECT--
Array
(
    [0] => 1
    [1] => 2
    [2] => 4
)