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]; $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();
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, int given in /in/GuuYD:15 Stack trace: #0 /in/GuuYD(29): arrangeNumbers() #1 {main} thrown in /in/GuuYD on line 15
Process exited with code 255.

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