3v4l.org

run code in 200+ PHP versions simultaneously
<?php $f = fopen('php://memory', 'w+'); fwrite($f, 'Hello'); ftruncate($f, 2); // in 7.3 changes file pointer to 2 fwrite($f, 'World'); rewind($f); echo addslashes(stream_get_contents($f)); fclose($f);
Output for 5.6.0 - 7.4.1
HeWorld