3v4l.org

run code in 300+ PHP versions simultaneously
<?php print("Hello World"); for($i = 1; $i<=10; $i++) print($i + "\n") ?>
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
Hello World Fatal error: Uncaught TypeError: Unsupported operand types: int + string in /in/hBLen:5 Stack trace: #0 {main} thrown in /in/hBLen on line 5
Process exited with code 255.
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33
Hello World Warning: A non-numeric value encountered in /in/hBLen on line 5 1 Warning: A non-numeric value encountered in /in/hBLen on line 5 2 Warning: A non-numeric value encountered in /in/hBLen on line 5 3 Warning: A non-numeric value encountered in /in/hBLen on line 5 4 Warning: A non-numeric value encountered in /in/hBLen on line 5 5 Warning: A non-numeric value encountered in /in/hBLen on line 5 6 Warning: A non-numeric value encountered in /in/hBLen on line 5 7 Warning: A non-numeric value encountered in /in/hBLen on line 5 8 Warning: A non-numeric value encountered in /in/hBLen on line 5 9 Warning: A non-numeric value encountered in /in/hBLen on line 5 10
Output for 7.0.0 - 7.0.20
Hello World12345678910

preferences:
163.41 ms | 401 KiB | 169 Q