3v4l.org

run code in 300+ PHP versions simultaneously
<?php $s = [ 25, 12, 23, 1006, 13, 114, 11, 34, 18, 13, 112 ]; sort($s); $func = function($a, $b){ $first_digitA = substr($a, 0, 1); $first_digitB = substr($b, 0, 1); if($first_digitA < $first_digitB){ return -1; } else if( $first_digitA > $first_digitB ){ return 1; } else { return 0; } }; usort($s, $func); print_r($s);
Output for git.master, git.master_jit, rfc.property-hooks
Array ( [0] => 11 [1] => 12 [2] => 13 [3] => 13 [4] => 18 [5] => 112 [6] => 114 [7] => 1006 [8] => 23 [9] => 25 [10] => 34 )

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:
181.21 ms | 405 KiB | 5 Q