3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d = '\n'; $str = "123$d"; $str = preg_replace("/\\\n/", "a", $str); print $str;
based on RJQ2p
Output for 4.3.0 - 7.2.0
123\n