3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $string = 'Marcelo Monteiro Custodio'; $email = 'marcelocustodiogmail.com'; print_r(preg_split('/\s/', email)); $a = filter_var($string, FILTER_VALIDATE_EMAIL); var_dump($a); foreach(preg_split('/\s/', $string) as $token) { echo $token . ' - '; }
based on cOAhs
Output for 7.2.0 - 7.3.0beta1
Warning: Use of undefined constant email - assumed 'email' (this will throw an Error in a future version of PHP) in /in/f2dQi on line 6 Array ( [0] => email ) bool(false) Marcelo - Monteiro - Custodio -
Output for 5.5.0 - 7.1.20
Notice: Use of undefined constant email - assumed 'email' in /in/f2dQi on line 6 Array ( [0] => email ) bool(false) Marcelo - Monteiro - Custodio -