bug75433.phpt 237 B

123456789101112131415161718
  1. --TEST--
  2. array_values() preserves next index from source array when shallow-copying
  3. --FILE--
  4. <?php
  5. $a = [1,2,3];
  6. unset($a[2]);
  7. $b = array_values($a);
  8. $b[] = 4;
  9. print_r($b);
  10. ?>
  11. --EXPECT--
  12. Array
  13. (
  14. [0] => 1
  15. [1] => 2
  16. [2] => 4
  17. )