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