3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = "doamin\username"; $newStr = str_replace('`\`','`\\\\`',$string); echo $newStr;

preferences:
131.49 ms | 1466 KiB | 5 Q