3v4l.org

run code in 300+ PHP versions simultaneously
<?php error_reporting(E_ALL); class asd { function __construct() { echo 'error_reporting on called function: ' . ini_get('error_reporting') . PHP_EOL; } function run() { asd1(); } } function asd1() { asd2(); } function asd2() { asd3(); } function asd3() { echo 'error_reporting on leaf: ' . ini_get('error_reporting') . PHP_EOL; @error_log('I am an error'); } $asd = new asd(); echo 'error_reporting before @: ' . ini_get('error_reporting') . PHP_EOL; @$asd->run();
Output for 7.0.0 - 7.0.33, 7.1.0 - 7.1.33, 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.6
error_reporting on called function: 32767 error_reporting before @: 32767 error_reporting on leaf: 32767 I am an error
Output for 5.5.0 - 5.5.38, 5.6.0 - 5.6.40
error_reporting on called function: 32767 error_reporting before @: 32767 error_reporting on leaf: 0 I am an error

preferences:
214.26 ms | 402 KiB | 330 Q