3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = "abc123@'#def"; var_dump(preg_replace('/([^\w\d])/', '\\$1', $input));
Output for 4.3.0 - 7.1.0
string(15) "abc123$1$1$1def"