Logo Search packages:      
Sourcecode: d-push version File versions  Download package

Mail_RFC822::_hasUnclosedQuotes ( string )

Checks if a string has an unclosed quotes or not.

private

Parameters:
string$stringThe string to check.
Returns:
boolean True if there are unclosed quotes inside the string, false otherwise.

Definition at line 350 of file z_RFC822.php.

Referenced by _hasUnclosedBracketsSub(), and _splitCheck().

    {
        $string     = explode('"', $string);
        $string_cnt = count($string);

        for ($i = 0; $i < (count($string) - 1); $i++)
            if (substr($string[$i], -1) == '\\')
                $string_cnt--;

        return ($string_cnt % 2 === 0);
    }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index