3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $fp = fopen('/tmp/test.txt', 'a+'); fwrite($fp, 'foo'); echo ftell($fp); fseek($fp, 0); fwrite($fp, 'bar'); echo ftell($fp); echo fread($fp, 3); fseek($fp, 0); echo fread($fp, 6);
based on CfPV9
Output for 5.3.20 - 5.5.24, 5.6.11, 5.6.28, 7.0.20 - 7.2.0
33foobar
Output for 5.5.25 - 5.6.10, 5.6.12 - 5.6.21, 7.0.0 - 7.0.6
33woohoo