3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r('before<br>'); trigger_error('error'); print_r(error_get_last()); $xml = new DOMDocument('1.0', 'UTF-8'); echo '<br><br><br>'; print_r('after<br>'); trigger_error('error'); $xml = new DOMDocument('1.0', 'UTF-8'); print_r(error_get_last()); ?>
Output for 5.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
before<br> Notice: error in /in/NlJYJ on line 4 Array ( [type] => 1024 [message] => error [file] => /in/NlJYJ [line] => 4 ) <br><br><br>after<br> Notice: error in /in/NlJYJ on line 11 Array ( [type] => 1024 [message] => error [file] => /in/NlJYJ [line] => 11 )
Output for 5.2.0 - 5.2.17
before<br> Notice: error in /in/NlJYJ on line 4 Array ( [type] => 1024 [message] => error [file] => /in/NlJYJ [line] => 4 ) <br><br><br>after<br> Notice: error in /in/NlJYJ on line 11
Output for 5.0.0 - 5.1.6
before<br> Notice: error in /in/NlJYJ on line 4 Fatal error: Call to undefined function error_get_last() in /in/NlJYJ on line 5
Process exited with code 255.
Output for 4.4.5 - 4.4.9
before<br> Notice: error in /in/NlJYJ on line 4 Fatal error: Call to undefined function: error_get_last() in /in/NlJYJ on line 5
Process exited with code 255.
Output for 4.3.2 - 4.4.4
before<br> Notice: error in /in/NlJYJ on line 4 Fatal error: Call to undefined function: error_get_last() in /in/NlJYJ on line 5
Process exited with code 255.
Output for 4.3.0 - 4.3.1
before<br> Notice: error in /in/NlJYJ on line 4 Fatal error: Call to undefined function: error_get_last() in /in/NlJYJ on line 5