3v4l.org

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