public function parseBool()
    {
        if ($this->last + 3 >= $this->len) {
            // At least `min(strlen('TRUE'), strlen('FALSE'))` characters are
            // required.
            return null;
        }

        $iBak = $this->last;
        $token = $this->str[$this->last] . $this->str[++$this->last]
        . $this->str[++$this->last] . $this->str[++$this->last]; // _TRUE_ or _FALS_e

        if (Context::isBool($token)) {
            return new Token($token, Token::TYPE_BOOL);
        } elseif (++$this->last < $this->len) {
            $token .= $this->str[$this->last]; // fals_E_
            if (Context::isBool($token)) {
                return new Token($token, Token::TYPE_BOOL, 1);
            }
        }

        $this->last = $iBak;

        return null;
    }
public function parseBool()
    {
        if ($this->last + 3 >= $this->len) {
            // At least `min(strlen('TRUE'), strlen('FALSE'))` characters are
            // required.
            return null;
        }

        $iBak = $this->last;
        $token = $this->str[$this->last] . $this->str[++$this->last]
        . $this->str[++$this->last] . $this->str[++$this->last]; // _TRUE_ or _FALS_e

        if (Context::isBool($token)) {
            return new Token($token, Token::TYPE_BOOL);
        } elseif (++$this->last < $this->len) {
            $token .= $this->str[$this->last]; // fals_E_
            if (Context::isBool($token)) {
                return new Token($token, Token::TYPE_BOOL, 1);
            }
        }

        $this->last = $iBak;

        return null;
    }
public function parseBool ( ) { if ( $ this -> last + 3 >= $ this -> len ) { // At least `min(strlen('TRUE'), strlen('FALSE'))` characters are // required. return null ; } $ iBak = $ this -> last ; $ token = $ this -> str [ $ this -> last ] . $ this -> str [ ++ $ this -> last ] . $ this -> str [ ++ $ this -> last ] . $ this -> str [ ++ $ this -> last ] ; // _TRUE_ or _FALS_e if ( Context :: isBool ( $ token ) ) { return new Token ( $ token , Token :: TYPE_BOOL ) ; } elseif ( ++ $ this -> last < $ this -> len ) { $ token .= $ this -> str [ $ this -> last ] ; // fals_E_ if ( Context :: isBool ( $ token ) ) { return new Token ( $ token , Token :: TYPE_BOOL , 1 ) ; } } $ this -> last = $ iBak ; return null ; }
Parses a boolean.

@return null|Token
Parses a boolean .