3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $bolValid = true; $strInput = 'hugh@yaho.com'; $arrBadDomains = array('@yahoo.com'); foreach ($arrBadDomains as $strBadDomain) { if (strlen($strInput) > strlen($strBadDomain)) { if (substr($strInput, (strlen($strInput) - strlen($strBadDomain))) == $strBadDomain) $bolValid = false; } } var_dump($bolValid);
Output for 4.3.0 - 7.1.0
bool(true)