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'm an error); } $asd = new asd(); echo 'error_reporting before @: ' . ini_get('error_reporting') . PHP_EOL; @$asd->run();
Output for 7.0.0
Parse error: syntax error, unexpected 'm' (T_STRING), expecting ',' or ')' in /in/8YB50 on line 20
Process exited with code 255.
Output for 5.5.24 - 5.5.30, 5.6.8 - 5.6.16
Parse error: syntax error, unexpected 'm' (T_STRING) in /in/8YB50 on line 20
Process exited with code 255.

preferences:
169.05 ms | 1395 KiB | 24 Q