3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $healthy = array("\"", "\r", "\n"); $yummy = array("\\\"", "\\r", "\\n"); $phrase = "\"foobar "; echo str_replace($healthy, $yummy, $phrase);
based on 9akDf
Output for 5.3.19 - 7.2.0
\"foobar\n