blob: d040f228ad53b3fa5a271fc1a3b17b6c38fc892f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
--TEST--
Test natcasesort() function : usage variations - octal values
--FILE--
<?php
/*
* Pass an array of octal values to test how natcasesort() re-orders it
*/
echo "*** Testing natcasesort() : usage variation ***\n";
$unsorted_oct_array = array(01235, 0321, 0345, 066, 0772, 077, -066, -0345, 0);
var_dump( natcasesort($unsorted_oct_array) );
var_dump($unsorted_oct_array);
echo "Done";
?>
--EXPECT--
*** Testing natcasesort() : usage variation ***
bool(true)
array(9) {
[6]=>
int(-54)
[7]=>
int(-229)
[8]=>
int(0)
[3]=>
int(54)
[5]=>
int(63)
[1]=>
int(209)
[2]=>
int(229)
[4]=>
int(506)
[0]=>
int(669)
}
Done
|