public function tokenIs($type)
    {
        if (is_string($this->token)) {
            return ($this->token == $type);
        }

        return ($this->token[0] == $type);
    }
public function tokenIs($type)
    {
        if (is_string($this->token)) {
            return ($this->token == $type);
        }

        return ($this->token[0] == $type);
    }
public function tokenIs ( $ type ) { if ( is_string ( $ this -> token ) ) { return ( $ this -> token == $ type ) ; } return ( $ this -> token [ 0 ] == $ type ) ; }
Check whether the current token matches the given value.

@param mixed $type The type that is expected, either a string value or a tokenizer id.

@return bool
Check whether the current token matches the given value .