xref: /PHP-8.3/ext/standard/tests/array/gh9296.phpt (revision 18621521)
1--TEST--
2GH-9296: incorrect ksort(..., SORT_REGULAR) behaviour on arrays with numeric and string keys
3--FILE--
4<?php
5$array = ["aaa" => 0, 600 => 1];
6ksort($array, SORT_REGULAR);
7var_dump($array);
8var_dump(array_key_first($array) <=> array_key_last($array));
9?>
10--EXPECT--
11array(2) {
12  [600]=>
13  int(1)
14  ["aaa"]=>
15  int(0)
16}
17int(-1)
18