3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $temp = tmpfile(); fwrite($temp, "writing to tempfile"); fseek($temp, 0); echo fread($temp, 1024); fclose($temp); // this removes the file fseek($temp, 0);
Output for 7.0.0 - 7.1.0
writing to tempfile Warning: fseek(): supplied resource is not a valid stream resource in /in/LXfrM on line 7
Output for 5.2.3 - 5.6.28
writing to tempfile Warning: fseek(): 4 is not a valid stream resource in /in/LXfrM on line 7
Output for 4.3.0 - 5.2.2
writing to tempfile Warning: fseek(): 1 is not a valid stream resource in /in/LXfrM on line 7