3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $filename = "./../tmp/unnex.txt"; $fp = fopen($filename,'r'); $via = fread ($fp, filesize ($filename)); fclose($fp); echo $via; ?>
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Warning: fopen(./../tmp/unnex.txt): failed to open stream: No such file or directory in /in/r0TSI on line 3 Warning: filesize(): stat failed for ./../tmp/unnex.txt in /in/r0TSI on line 4 Warning: fread() expects parameter 1 to be resource, boolean given in /in/r0TSI on line 4 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/r0TSI on line 5
Output for hhvm-3.10.0 - 3.12.0
Warning: No such file or directory in /in/r0TSI on line 3 Warning: filesize(): No such file or directory in /in/r0TSI on line 4 Warning: fread() expects parameter 1 to be resource, boolean given in /in/r0TSI on line 4 Warning: fclose() expects parameter 1 to be resource, boolean given in /in/r0TSI on line 5
Output for 5.0.0 - 5.2.17
Warning: fopen(./../tmp/unnex.txt): failed to open stream: No such file or directory in /in/r0TSI on line 3 Warning: filesize(): stat failed for ./../tmp/unnex.txt in /in/r0TSI on line 4 Warning: fread(): supplied argument is not a valid stream resource in /in/r0TSI on line 4 Warning: fclose(): supplied argument is not a valid stream resource in /in/r0TSI on line 5
Output for 4.3.2 - 4.4.9
Warning: fopen(./../tmp/unnex.txt): failed to open stream: No such file or directory in /in/r0TSI on line 3 Warning: filesize(): Stat failed for ./../tmp/unnex.txt (errno=2 - No such file or directory) in /in/r0TSI on line 4 Warning: fread(): supplied argument is not a valid stream resource in /in/r0TSI on line 4 Warning: fclose(): supplied argument is not a valid stream resource in /in/r0TSI on line 5
Output for 4.3.0 - 4.3.1
Warning: fopen(./../tmp/unnex.txt) [http://www.php.net/function.fopen]: failed to create stream: No such file or directory in /in/r0TSI on line 3 Warning: filesize() [http://www.php.net/function.filesize]: Stat failed for ./../tmp/unnex.txt (errno=2 - No such file or directory) in /in/r0TSI on line 4 Warning: fread(): supplied argument is not a valid stream resource in /in/r0TSI on line 4 Warning: fclose(): supplied argument is not a valid stream resource in /in/r0TSI on line 5