<?php
$email = 'none';
$user = strstr($email, '@', true); // As of PHP 5.3.0
var_dump($user); // prints name
echo PHP_EOL;
$email = 'MAIL@ME!';
$user = strstr($email, '@', true); // As of PHP 5.3.0
var_dump($user); // prints name
Warning: Wrong parameter count for strstr() in /in/WTkmM on line 3
NULL
Warning: Wrong parameter count for strstr() in /in/WTkmM on line 9
NULL
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/WTkmM on line 10
Process exited with code 255.
Output for 4.3.0 - 4.3.9, 5.0.0 - 5.0.1
Warning: Wrong parameter count for strstr() in /in/WTkmM on line 3
NULL
Notice: Use of undefined constant PHP_EOL - assumed 'PHP_EOL' in /in/WTkmM on line 6
PHP_EOL
Warning: Wrong parameter count for strstr() in /in/WTkmM on line 9
NULL