If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead.
?php $email = 'user@example.com'; $domaine = strstr($email, '@'); print $domaine; / / Affiche @example.com?