3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $username = "derp_5_derp_@derp.com"; $username = preg_replace('/[^a-z0-9_]/', '_', $username); echo $username;
based on gjGsX
Output for 4.3.0 - 7.1.0
derp_5_derp__derp_com