3v4l.org

run code in 300+ PHP versions simultaneously
<?php function joinNumbers($a, $b) { $t=10; while($b>=$t) $t*=10; return $a*$t+$b; } function arrangeNumbers() { $a = [1,34,3,98,9,76,45,4]; joinNumbers $size=count($a)/count($a[0]); for($i=0;$i<$size-1;$i++) for($j=$i+1;$j<$size;$j++) if(joinNumbers($a[$i],$a[$j])<joinNumbers($a[$j],$a[$i])) swap($a[$i],$a[$j]); printf("Number is : "); for($i=0;$i<$size;$i++) printf("%d",$a[$i]); printf("\n\n"); } arrangeNumbers();

Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).

VersionSystem time (s)User time (s)Memory (MiB)
7.0.10.0100.04020.09
7.0.00.0030.08320.23
5.6.160.0100.08020.39
5.6.150.0070.03718.15
5.6.140.0070.07318.11
5.6.130.0070.09018.23
5.6.120.0000.05720.88
5.6.110.0130.07721.02
5.6.100.0170.05321.01
5.6.90.0030.05021.04
5.6.80.0070.05020.54
5.5.300.0130.07017.98
5.5.290.0070.03718.04
5.5.280.0100.05320.66
5.5.270.0100.08020.79
5.5.260.0130.07020.77
5.5.250.0030.09020.58
5.5.240.0230.07320.13

preferences:
147.9 ms | 1394 KiB | 7 Q