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); fpassthru($fp); fseek($temp, 0);
Output for 5.3.28 - 5.3.29, 5.4.18 - 7.1.0
writing to tempfile Notice: Undefined variable: fp in /in/ul7vZ on line 7 Warning: fpassthru() expects parameter 1 to be resource, null given in /in/ul7vZ on line 7
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.17
writing to tempfile Notice: Undefined variable: fp in /in/IRlpL on line 7 Warning: fpassthru() expects parameter 1 to be resource, null given in /in/IRlpL on line 7
Output for 5.0.4 - 5.2.17
writing to tempfile Notice: Undefined variable: fp in /in/IRlpL on line 7 Warning: fpassthru(): supplied argument is not a valid stream resource in /in/IRlpL on line 7
Output for 4.3.1 - 5.0.3
writing to tempfile Notice: Undefined variable: fp in /in/IRlpL on line 7 Warning: fpassthru(): supplied argument is not a valid stream resource in /in/IRlpL on line 7
Output for 4.3.0
writing to tempfile Notice: Undefined variable: fp in /in/ul7vZ on line 7 Warning: fpassthru(): supplied argument is not a valid stream resource in /in/ul7vZ on line 7