1--TEST--
2Test natcasesort() function : usage variations - different hex values
3--FILE--
4<?php
5/* Prototype  : bool natcasesort(array &$array_arg)
6 * Description: Sort an array using case-insensitive natural sort
7 * Source code: ext/standard/array.c
8 */
9
10/*
11 * Pass an array of different hex values to test how natcasesort() re-orders it
12 */
13
14echo "*** Testing natcasesort() : usage variation ***\n";
15
16$unsorted_hex_array = array(0x1AB, 0xFFF, 0xF, 0xFF, 0x2AA, 0xBB, 0x1ab, 0xff, -0xFF, 0, -0x2aa);
17var_dump( natcasesort($unsorted_hex_array) );
18var_dump($unsorted_hex_array);
19
20echo "Done";
21?>
22--EXPECTF--
23*** Testing natcasesort() : usage variation ***
24bool(true)
25array(11) {
26  [8]=>
27  int(-255)
28  [10]=>
29  int(-682)
30  [9]=>
31  int(0)
32  [2]=>
33  int(15)
34  [5]=>
35  int(187)
36  [3]=>
37  int(255)
38  [7]=>
39  int(255)
40  [0]=>
41  int(427)
42  [6]=>
43  int(427)
44  [4]=>
45  int(682)
46  [1]=>
47  int(4095)
48}
49Done
50