3v4l.org

run code in 300+ PHP versions simultaneously
<?php printf("PHP %d\n", defined('PHP_MAJOR_VERSION') ? PHP_MAJOR_VERSION : PHP_VERSION); if (true) { echo 1 + array(); } echo "Finished\n";
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.33, 8.2.0 - 8.2.29, 8.3.0 - 8.3.26, 8.4.1 - 8.4.13
PHP 8 Fatal error: Uncaught TypeError: Unsupported operand types: int + array in /in/DutCZ:6 Stack trace: #0 {main} thrown in /in/DutCZ on line 6
Process exited with code 255.
Output for 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Fatal error: Unsupported operand types in /in/DutCZ on line 6
Process exited with code 255.

preferences:
106.58 ms | 407 KiB | 5 Q