xref: /PHP-5.6/ext/standard/tests/array/004.phpt (revision a541bb80)
1--TEST--
2Test natsort and natcasesort
3--INI--
4precision=14
5--FILE--
6<?php
7$data = array(
8	'Test1',
9	'teST2'=>0,
10	5=>'test2',
11	'abc'=>'test10',
12	'test21'
13);
14
15var_dump($data);
16
17natsort($data);
18var_dump($data);
19
20natcasesort($data);
21var_dump($data);
22?>
23--EXPECT--
24array(5) {
25  [0]=>
26  string(5) "Test1"
27  ["teST2"]=>
28  int(0)
29  [5]=>
30  string(5) "test2"
31  ["abc"]=>
32  string(6) "test10"
33  [6]=>
34  string(6) "test21"
35}
36array(5) {
37  ["teST2"]=>
38  int(0)
39  [0]=>
40  string(5) "Test1"
41  [5]=>
42  string(5) "test2"
43  ["abc"]=>
44  string(6) "test10"
45  [6]=>
46  string(6) "test21"
47}
48array(5) {
49  ["teST2"]=>
50  int(0)
51  [0]=>
52  string(5) "Test1"
53  [5]=>
54  string(5) "test2"
55  ["abc"]=>
56  string(6) "test10"
57  [6]=>
58  string(6) "test21"
59}
60