3v4l.org

run code in 300+ PHP versions simultaneously
<?php $text = <<<'AHA' ewfda fdffdsfddsa fdsaf ewewem thurn@live.com rewqreqw fda fdefhgfjh fdsa fdsaf fangorn@hotmail.com rewqr re q rewqrrwq fda fdfdf dsa fdsaf euice@outlook.com ewrewqre fd a f fhjhfdffdsaf fdsa fdsaf rgarcia@optonline.net rewqrewq fda fdfdsa fdsaf mxiao@yahoo.com rewreqw rewqer fda fd hffdsa fdsaf firstpr@att.net r ewqrewq AHA; $pattern='/\S+@\S+\.\S{1,6}/'; preg_match_all($pattern, $text, $matchArray); print_r($matchArray[0]);

preferences:
28.08 ms | 402 KiB | 5 Q