3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $from = '<foo@example.com>'; $tmp = explode('<', $from); if (count($tmp) > 1) { $mail = explode('>', $tmp[1]); $consumer_mail = $mail[0]; } else { $consumer_mail = $from; } echo $consumer_mail;
based on Y9dAm
Output for 4.3.0 - 7.1.7
foo@example.com