1--TEST--
2SPL: Test ArrayObject::ksort() function : basic functionality with object base 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";
13Class C {
14	public $x = 'prop1';
15	public $z = 'prop2';
16	public $a = 'prop3';
17	private $b = 'prop4';
18}
19
20$c = new C;
21$ao1 = new ArrayObject($c);
22var_dump($ao1->ksort());
23var_dump($ao1, $c);
24?>
25===DONE===
26--EXPECT--
27*** Testing ArrayObject::ksort() : basic functionality ***
28bool(true)
29object(ArrayObject)#2 (1) {
30  ["storage":"ArrayObject":private]=>
31  object(C)#1 (4) {
32    ["b":"C":private]=>
33    string(5) "prop4"
34    ["a"]=>
35    string(5) "prop3"
36    ["x"]=>
37    string(5) "prop1"
38    ["z"]=>
39    string(5) "prop2"
40  }
41}
42object(C)#1 (4) {
43  ["b":"C":private]=>
44  string(5) "prop4"
45  ["a"]=>
46  string(5) "prop3"
47  ["x"]=>
48  string(5) "prop1"
49  ["z"]=>
50  string(5) "prop2"
51}
52===DONE===
53