3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myarray[0]['height'] = 175; $myarray[0]['weight'] = 68; $myarray[0]['age'] = 44; $myarray[1]['height'] = 166; $myarray[1]['weight'] = 82; $myarray[1]['age'] = 56; $myarray[2]['height'] = 188; $myarray[2]['weight'] = 82; $myarray[2]['age'] = 35; function build_sorter($key) { return function ($a, $b) use ($key) { return strnatcmp($a[$key], $b[$key]); }; } usort($myarray, build_sorter('age')); print_r($myarray);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [height] => 188 [weight] => 82 [age] => 35 ) [1] => Array ( [height] => 175 [weight] => 68 [age] => 44 ) [2] => Array ( [height] => 166 [weight] => 82 [age] => 56 ) )

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:
26.81 ms | 406 KiB | 5 Q