1--TEST--
2SPL: Test ArrayObject::natcasesort() function : basic functionality
3--FILE--
4<?php
5/* Prototype  : int ArrayObject::natcasesort()
6 * Description: proto int ArrayIterator::natcasesort()
7 Sort the entries by values using case insensitive "natural order" algorithm.
8 * Source code: ext/spl/spl_array.c
9 * Alias to functions:
10 */
11
12echo "*** Testing ArrayObject::natcasesort() : basic functionality ***\n";
13
14$ao1 = new ArrayObject(array('boo10','boo1','boo2','boo22','BOO5'));
15$ao2 = new ArrayObject(array('a'=>'boo10','b'=>'boo1','c'=>'boo2','d'=>'boo22','e'=>'BOO5'));
16var_dump($ao1->natcasesort());
17var_dump($ao1);
18var_dump($ao2->natcasesort('blah'));
19var_dump($ao2);
20?>
21===DONE===
22--EXPECTF--
23*** Testing ArrayObject::natcasesort() : basic functionality ***
24bool(true)
25object(ArrayObject)#1 (1) {
26  ["storage":"ArrayObject":private]=>
27  array(5) {
28    [1]=>
29    string(4) "boo1"
30    [2]=>
31    string(4) "boo2"
32    [4]=>
33    string(4) "BOO5"
34    [0]=>
35    string(5) "boo10"
36    [3]=>
37    string(5) "boo22"
38  }
39}
40bool(true)
41object(ArrayObject)#2 (1) {
42  ["storage":"ArrayObject":private]=>
43  array(5) {
44    ["b"]=>
45    string(4) "boo1"
46    ["c"]=>
47    string(4) "boo2"
48    ["e"]=>
49    string(4) "BOO5"
50    ["a"]=>
51    string(5) "boo10"
52    ["d"]=>
53    string(5) "boo22"
54  }
55}
56===DONE===
57