3v4l.org

run code in 300+ PHP versions simultaneously
<?php for($i = 1 ; $i <= 4 ; $i++){ for($j = 1 ; $j <= 4-($i) ; $j ++){ echo "*"; } for ($k=1; $k <=4 ; $k++) { print $k; } echo "<br />"; }
Output for 7.4.0 - 7.4.30, 8.0.1 - 8.0.20, 8.1.0 - 8.1.7
***1234<br />**1234<br />*1234<br />1234<br />

preferences:
19.33 ms | 409 KiB | 5 Q