3v4l.org

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

preferences:
24.11 ms | 404 KiB | 5 Q