3v4l.org

run code in 300+ PHP versions simultaneously
<?php $array = array ( 0 => (object)array( 'tenure' => '1 year to less than 2 years' ), 1 => (object)array( 'tenure' => '10 years to less than 15 years' ), 2 => (object)array( 'tenure' => '15 years or more' ), 3 => (object)array( 'tenure' => '2 years to less than 5 years' ), 4 => (object)array( 'tenure' => '5 years to less than 10 years' ) ); usort($array, function ($a, $b) { return (int)$a->tenure - (int)$b->tenure; }); print_r($array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => stdClass Object ( [tenure] => 1 year to less than 2 years ) [1] => stdClass Object ( [tenure] => 2 years to less than 5 years ) [2] => stdClass Object ( [tenure] => 5 years to less than 10 years ) [3] => stdClass Object ( [tenure] => 10 years to less than 15 years ) [4] => stdClass Object ( [tenure] => 15 years or more ) )

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:
86.94 ms | 407 KiB | 5 Q