1--TEST--
2Test natcasesort() function : basic functionality
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 * Test basic functionality of natcasesort()
12 */
13
14echo "*** Testing natcasesort() : basic functionality ***\n";
15
16$array = array ('A01', 'a1', 'b10',  'a01', 'b01');
17echo "\n-- Before sorting: --\n";
18var_dump($array);
19
20echo "\n-- After Sorting: --\n";
21var_dump(natcasesort($array));
22var_dump($array);
23
24echo "Done";
25?>
26--EXPECTF--
27*** Testing natcasesort() : basic functionality ***
28
29-- Before sorting: --
30array(5) {
31  [0]=>
32  string(3) "A01"
33  [1]=>
34  string(2) "a1"
35  [2]=>
36  string(3) "b10"
37  [3]=>
38  string(3) "a01"
39  [4]=>
40  string(3) "b01"
41}
42
43-- After Sorting: --
44bool(true)
45array(5) {
46  [0]=>
47  string(3) "A01"
48  [3]=>
49  string(3) "a01"
50  [1]=>
51  string(2) "a1"
52  [4]=>
53  string(3) "b01"
54  [2]=>
55  string(3) "b10"
56}
57Done
58