3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $f = fopen("data1.txt",'r+') or die("Error"); //echo fread($f, 5); //echo fread($f, 3); $s = filesize("data1.txt"); echo fread($f, $s); fwrite($f,'ksdhfkjsdf'); echo fread($f, $s+10); file_put_contents("data1.txt",'\n1234567890',FILE_APPEND); echo fread($f, $s+30); fclose($f); ?>
Output for 4.3.2 - 5.6.28, 7.0.0 - 7.1.0
Warning: fopen(data1.txt): failed to open stream: No such file or directory in /in/vg7DK on line 2 Error
Output for hhvm-3.10.0 - 3.12.0
Warning: No such file or directory in /in/vg7DK on line 2 Error
Output for 4.3.0 - 4.3.1
Warning: fopen(data1.txt) [http://www.php.net/function.fopen]: failed to create stream: No such file or directory in /in/vg7DK on line 2 Error