3v4l.org

run code in 200+ php & hhvm versions
<?php $a="abc123"; var_dump(mb_ereg_replace("123","def\\",$a));
based on 6Xqcr
Output for 7.3.0 - 7.3.1
string(8) "abcdef\"
Output for 7.1.25 - 7.2.13
string(7) "abcdef\"