3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = "michael@test.com dave@cheese.mansions milkman@serverdouche.co.uk"; $email = preg_grep("/[-0-9a-zA-Z.+_]+@[-0-9a-zA-Z.+_]+\.[a-zA-Z]+/", explode(' ', $input)); var_dump($email);
based on 5cLPJ
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
array(3) { [0]=> string(16) "michael@test.com" [5]=> string(20) "dave@cheese.mansions" [9]=> string(26) "milkman@serverdouche.co.uk" }
Output for hhvm-3.10.0

Process exited with code 153.