3v4l.org

run code in 300+ PHP versions simultaneously
<?php $y = ['!']; for($i = 1; $i <= 5; $i++) { print "PHP!"."$y\t"; if($y+1 <5) $y="!"; $y+'!'; }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.34, 8.2.0 - 8.2.30, 8.3.0 - 8.3.30, 8.4.1 - 8.4.18, 8.5.0 - 8.5.3
Warning: Array to string conversion in /in/603tP on line 6 PHP!Array Fatal error: Uncaught TypeError: Unsupported operand types: array + int in /in/603tP:7 Stack trace: #0 {main} thrown in /in/603tP on line 7
Process exited with code 255.
Output for 7.3.0 - 7.3.31, 7.3.33, 7.4.0 - 7.4.25, 7.4.27 - 7.4.33
Notice: Array to string conversion in /in/603tP on line 6 PHP!Array Fatal error: Uncaught Error: Unsupported operand types in /in/603tP:7 Stack trace: #0 {main} thrown in /in/603tP on line 7
Process exited with code 255.
Output for 7.3.32, 7.4.26
PHP!Array Fatal error: Uncaught Error: Unsupported operand types in /in/603tP:7 Stack trace: #0 {main} thrown in /in/603tP on line 7
Process exited with code 255.

preferences:
109.25 ms | 1406 KiB | 4 Q