3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $email = "h@hotmail.com"; $em = explode("@", $email); $name = $em[0]; echo ((strlen($name) > 3) ? substr($name, 0, (strlen($name)/2)) : "") . "***@$em[1]\n"; $email = "hag@hotmail.com"; $em = explode("@", $email); $name = $em[0]; echo ((strlen($name) > 3) ? substr($name, 0, (strlen($name)/2)) : "") . "***@$em[1]\n"; $email = "verylongemail@hotmail.com"; $em = explode("@", $email); $name = $em[0]; echo ((strlen($name) > 3) ? substr($name, 0, (strlen($name)/2) : "") . "***@$em[1]\n";
Output for 5.3.0 - 5.4.23
Parse error: syntax error, unexpected ':' in /in/ulZNp on line 22
Process exited with code 255.