3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $file = '/etc/ssh/sshd_config'; $handle = fopen($file, 'r'); $data = fread($handle, filesize($file)); fclose($handle); echo $data;
Output for 5.3.0 - 7.1.0
Warning: fopen(/etc/ssh/sshd_config): failed to open stream: No such file or directory in /in/1ZsNq on line 4 Warning: filesize(): stat failed for /etc/ssh/sshd_config in /in/1ZsNq on line 5 Warning: fread() expects parameter 1 to be resource, boolean given in /in/1ZsNq on line 5 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/1ZsNq on line 7
Output for 5.0.0 - 5.2.17
Warning: fopen(/etc/ssh/sshd_config): failed to open stream: No such file or directory in /in/1ZsNq on line 4 Warning: filesize(): stat failed for /etc/ssh/sshd_config in /in/1ZsNq on line 5 Warning: fread(): supplied argument is not a valid stream resource in /in/1ZsNq on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/1ZsNq on line 7
Output for 4.3.2 - 4.4.9
Warning: fopen(/etc/ssh/sshd_config): failed to open stream: No such file or directory in /in/1ZsNq on line 4 Warning: filesize(): Stat failed for /etc/ssh/sshd_config (errno=2 - No such file or directory) in /in/1ZsNq on line 5 Warning: fread(): supplied argument is not a valid stream resource in /in/1ZsNq on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/1ZsNq on line 7
Output for 4.3.0 - 4.3.1
Warning: fopen(/etc/ssh/sshd_config) [http://www.php.net/function.fopen]: failed to create stream: No such file or directory in /in/1ZsNq on line 4 Warning: filesize() [http://www.php.net/function.filesize]: Stat failed for /etc/ssh/sshd_config (errno=2 - No such file or directory) in /in/1ZsNq on line 5 Warning: fread(): supplied argument is not a valid stream resource in /in/1ZsNq on line 5 Warning: fclose(): supplied argument is not a valid stream resource in /in/1ZsNq on line 7