3v4l.org

run code in 300+ PHP versions simultaneously
<?php trigger_error('this is no problem - just a notice'); set_error_handler(function ($s, $m, $f, $l) { throw new ErrorException($m, 0, $s, $f, $l); }); echo "this will still work fine:"; @trigger_error('see? no problem'); echo "\nthis, however, will not:"; trigger_error('problems');
Output for 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
Notice: this is no problem - just a notice in /in/XukW5 on line 3 this will still work fine: Fatal error: Uncaught ErrorException: see? no problem in /in/XukW5:9 Stack trace: #0 [internal function]: {closure}(1024, 'see? no problem', '/in/XukW5', 9) #1 /in/XukW5(9): trigger_error('see? no problem') #2 {main} thrown in /in/XukW5 on line 9
Process exited with code 255.
Output for 7.1.25 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33
Notice: this is no problem - just a notice in /in/XukW5 on line 3 this will still work fine: Fatal error: Uncaught ErrorException: see? no problem in /in/XukW5:9 Stack trace: #0 [internal function]: {closure}(1024, 'see? no problem', '/in/XukW5', 9, Array) #1 /in/XukW5(9): trigger_error('see? no problem') #2 {main} thrown in /in/XukW5 on line 9
Process exited with code 255.

preferences:
215.1 ms | 402 KiB | 182 Q