3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $email = "h@hotmail.com"; $em = explode("@",$email); $name = $em[0]; $len = strlen($name); echo substr($name,0, $len/2) . str_repeat('*', $len/2) . "@" . $em[1];
Output for 4.3.0 - 7.2.0
@hotmail.com