private static function splitFriendlyEmail($email)
    {
        if (false !== strpos($email, '<')) {
            return array_map('trim', explode(' <', str_replace('>', '', $email)));
        } elseif (false !== strpos($email, '[')) {
            return array_map('trim', explode(' [', str_replace(']', '', $email)));
        } else {
            return ['', $email];
        }
    }
private static function splitFriendlyEmail($email)
    {
        if (false !== strpos($email, '<')) {
            return array_map('trim', explode(' <', str_replace('>', '', $email)));
        } elseif (false !== strpos($email, '[')) {
            return array_map('trim', explode(' [', str_replace(']', '', $email)));
        } else {
            return ['', $email];
        }
    }
private static function splitFriendlyEmail ( $ email ) { if ( false !== strpos ( $ email , '<' ) ) { return array_map ( 'trim' , explode ( ' <' , str_replace ( '>' , '' , $ email ) ) ) ; } elseif ( false !== strpos ( $ email , '[' ) ) { return array_map ( 'trim' , explode ( ' [' , str_replace ( ']' , '' , $ email ) ) ) ; } else { return [ '' , $ email ] ; } }
Split a friendly-name e-address and return name and e-mail as array

@author Leo Feyer <https://github.com/leofeyer> for Contao Open Source CMS <https://github.com/contao>

@param string $email A friendly-name e-mail address

@return array An array with name and e-mail address
Split a friendly - name e - address and return name and e - mail as array