3v4l.org

run code in 300+ PHP versions simultaneously
<?php $my_array = array( array(0=>"a", 1=>"b", 4=>"c"), array(3=>"z"), array(0=>"p", 2=>"k"), ); usort($my_array, function($a, $b) { if (count($a) == count($b)) { return 0; } return (count($a) < count($b)) ? -1 : 1; }); print_r($my_array);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => Array ( [3] => z ) [1] => Array ( [0] => p [2] => k ) [2] => Array ( [0] => a [1] => b [4] => c ) )

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:
62.12 ms | 401 KiB | 8 Q