3v4l.org

run code in 150+ 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 7qgoY
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
foo@example.com