3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php if (@readfile('/foo') === false) { error_log('foo', 3, '/log.log'); } header('HTTP/1.1 404 Not Found'); echo "foo";
based on YK8sL
Output for 5.2.3 - 5.6.28, 7.0.0 - 7.1.0
Warning: error_log(/log.log): failed to open stream: Permission denied in /in/sunlJ on line 4 Warning: Cannot modify header information - headers already sent by (output started at /in/sunlJ:4) in /in/sunlJ on line 6 foo
Output for hhvm-3.12.0
Warning: Permission denied in /in/sunlJ on line 4 Warning: Not a valid stream resource in /in/sunlJ on line 4 Warning: Not a valid stream resource in /in/sunlJ on line 4 foo
Output for hhvm-3.10.0

Process exited with code 153.
Output for 4.3.2 - 5.2.2
Warning: error_log(/log.log): failed to open stream: Permission denied in /in/sunlJ on line 4 foo
Output for 4.3.0 - 4.3.1
Warning: error_log(/log.log) [http://www.php.net/function.error-log]: failed to create stream: Permission denied in /in/sunlJ on line 4 foo