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.27, 8.2.0 - 8.2.17, 8.3.0 - 8.3.4
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:
151.03 ms | 401 KiB | 152 Q