1--TEST--
2SPL: Test ArrayObject::ksort() function : basic functionality with array based store
3--FILE--
4<?php
5/* Prototype  : int ArrayObject::ksort()
6 * Description: proto int ArrayIterator::ksort()
7 * Sort the entries by key.
8 * Source code: ext/spl/spl_array.c
9 * Alias to functions:
10 */
11
12echo "*** Testing ArrayObject::ksort() : basic functionality ***\n";
13$ao1 = new ArrayObject(array(4,2,3));
14$ao2 = new ArrayObject(array('b'=>4,'a'=>2,'q'=>3, 99=>'x'));
15var_dump($ao1->ksort());
16var_dump($ao1);
17var_dump($ao2->ksort('blah'));
18var_dump($ao2);
19?>
20===DONE===
21--EXPECTF--
22*** Testing ArrayObject::ksort() : basic functionality ***
23bool(true)
24object(ArrayObject)#1 (1) {
25  ["storage":"ArrayObject":private]=>
26  array(3) {
27    [0]=>
28    int(4)
29    [1]=>
30    int(2)
31    [2]=>
32    int(3)
33  }
34}
35bool(true)
36object(ArrayObject)#2 (1) {
37  ["storage":"ArrayObject":private]=>
38  array(4) {
39    ["a"]=>
40    int(2)
41    ["b"]=>
42    int(4)
43    ["q"]=>
44    int(3)
45    [99]=>
46    string(1) "x"
47  }
48}
49===DONE===
50