3v4l.org

run code in 300+ PHP versions simultaneously
<?php $i = 0; try{ throw new exception('Missing value in item #'.$i+1); } catch(exception $e) { print($e->getMessage()); }
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
Missing value in item #1
Output for 7.4.0 - 7.4.33
Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /in/qr0IH on line 6 Warning: A non-numeric value encountered in /in/qr0IH on line 6 1
Output for 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33
Warning: A non-numeric value encountered in /in/qr0IH on line 6 1
Output for 5.5.24 - 5.5.35, 5.6.8 - 5.6.28, 7.0.0 - 7.0.20
1

preferences:
176.98 ms | 402 KiB | 185 Q