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