3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = [ new StdClass, new StdClass, new StdClass, ]; $arr[0]->path_to_file = "roberson_wine_5"; $arr[0]->order = 2; $arr[1]->path_to_file = "roberson_wine_5"; $arr[1]->order = 3; $arr[2]->path_to_file = "roberson_wine_3"; $arr[2]->order = 1; print_r($arr); usort($arr, function($a, $b){ if($a->order == $b->order) return 0; return $a->order > $b->order ? 1: -1; }); print_r($arr);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [path_to_file] => roberson_wine_5 [order] => 2 ) [1] => stdClass Object ( [path_to_file] => roberson_wine_5 [order] => 3 ) [2] => stdClass Object ( [path_to_file] => roberson_wine_3 [order] => 1 ) ) Array ( [0] => stdClass Object ( [path_to_file] => roberson_wine_3 [order] => 1 ) [1] => stdClass Object ( [path_to_file] => roberson_wine_5 [order] => 2 ) [2] => stdClass Object ( [path_to_file] => roberson_wine_5 [order] => 3 ) )

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
45.54 ms | 402 KiB | 8 Q