3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?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();
based on 8YB50
Output for 7.0.0
Parse error: syntax error, unexpected 'error_reporting' (T_STRING), expecting ',' or ')' in /in/UIKCj on line 24
Process exited with code 255.
Output for 5.4.10 - 5.6.16
Parse error: syntax error, unexpected 'error_reporting' (T_STRING) in /in/UIKCj on line 24
Process exited with code 255.
Output for 5.3.20 - 5.3.29
Parse error: syntax error, unexpected T_STRING in /in/UIKCj on line 24
Process exited with code 255.