3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $obj1 = new stdClass; $obj1->Sort = 1; $obj2 = new stdClass; $obj2->Sort = 1; $items = array($obj1, $obj2); asort( $items); var_dump($items);
based on YgUa2
Output for 7.0.0 - 7.2.0
array(2) { [0]=> object(stdClass)#1 (1) { ["Sort"]=> int(1) } [1]=> object(stdClass)#2 (1) { ["Sort"]=> int(1) } }
Output for 5.3.18 - 5.6.28
array(2) { [1]=> object(stdClass)#2 (1) { ["Sort"]=> int(1) } [0]=> object(stdClass)#1 (1) { ["Sort"]=> int(1) } }