3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $user_email = "dbutt@westminstertoyota.com"; $allowed_domain = '/^[^@]+@[^@]*toyota[^@]*\.[^@]+/'; preg_match($allowed_domain, $user_email, $matches); print_r($matches); $regex = preg_quote($allowed_domain, '#') . '$'; $res = preg_match("#$regex#i", $user_email); print_r($res);
Output for 4.3.0 - 7.1.0
Array ( [0] => dbutt@westminstertoyota.com ) 0