public static function isString($str)
    {
        if (strlen($str) === 0) {
            return null;
        }
        if ($str[0] === '\'') {
            return Token::FLAG_STRING_SINGLE_QUOTES;
        } elseif ($str[0] === '"') {
            return Token::FLAG_STRING_DOUBLE_QUOTES;
        }

        return null;
    }
public static function isString($str)
    {
        if (strlen($str) === 0) {
            return null;
        }
        if ($str[0] === '\'') {
            return Token::FLAG_STRING_SINGLE_QUOTES;
        } elseif ($str[0] === '"') {
            return Token::FLAG_STRING_DOUBLE_QUOTES;
        }

        return null;
    }
public static function isString ( $ str ) { if ( strlen ( $ str ) === 0 ) { return null ; } if ( $ str [ 0 ] === '\'' ) { return Token :: FLAG_STRING_SINGLE_QUOTES ; } elseif ( $ str [ 0 ] === '"' ) { return Token :: FLAG_STRING_DOUBLE_QUOTES ; } return null ; }
Checks if the given character is the beginning of a string.

@param string $str string to be checked

@return int the appropriate flag for the string type
Checks if the given character is the beginning of a string .