public function safeEmailFilter($str)
    {
        $email   = '';
        for ($i = 0, $len = strlen($str); $i < $len; $i++) {
            $j = random_int(0, 1);

            $email .= $j === 0 ? '&#' . ord($str[$i]) . ';' : $str[$i];
        }

        return str_replace('@', '&#64;', $email);
    }
public function safeEmailFilter($str)
    {
        $email   = '';
        for ($i = 0, $len = strlen($str); $i < $len; $i++) {
            $j = random_int(0, 1);

            $email .= $j === 0 ? '&#' . ord($str[$i]) . ';' : $str[$i];
        }

        return str_replace('@', '&#64;', $email);
    }
public function safeEmailFilter ( $ str ) { $ email = '' ; for ( $ i = 0 , $ len = strlen ( $ str ) ; $ i < $ len ; $ i ++ ) { $ j = random_int ( 0 , 1 ) ; $ email .= $ j === 0 ? '&#' . ord ( $ str [ $ i ] ) . ';' : $ str [ $ i ] ; } return str_replace ( '@' , '&#64;' , $ email ) ; }
Protects email address.

@param  string $str

@return string
Protects email address .