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