public function peek($distance = 1)
	{
		if($distance < 0)
		{
			throw new \InvalidArgumentException('Peek must be a lookahead => distance must be greater than or equal to 0');
		}
		
		$idx = $this->index + $distance - 1;
		
		while(isset($this->tokens[$idx]))
		{
			$tok = $this->tokens[$idx++];
	
			if(is_array($tok))
			{
				switch($tok[0])
				{
					case T_COMMENT:
					case T_WHITESPACE:
					case T_DOC_COMMENT:
						continue 2;
				}
			}
			
			return $tok;
		}
	
		return false;
	}
public function peek($distance = 1)
	{
		if($distance < 0)
		{
			throw new \InvalidArgumentException('Peek must be a lookahead => distance must be greater than or equal to 0');
		}
		
		$idx = $this->index + $distance - 1;
		
		while(isset($this->tokens[$idx]))
		{
			$tok = $this->tokens[$idx++];
	
			if(is_array($tok))
			{
				switch($tok[0])
				{
					case T_COMMENT:
					case T_WHITESPACE:
					case T_DOC_COMMENT:
						continue 2;
				}
			}
			
			return $tok;
		}
	
		return false;
	}
public function peek ( $ distance = 1 ) { if ( $ distance < 0 ) { throw new \ InvalidArgumentException ( 'Peek must be a lookahead => distance must be greater than or equal to 0' ) ; } $ idx = $ this -> index + $ distance - 1 ; while ( isset ( $ this -> tokens [ $ idx ] ) ) { $ tok = $ this -> tokens [ $ idx ++ ] ; if ( is_array ( $ tok ) ) { switch ( $ tok [ 0 ] ) { case T_COMMENT : case T_WHITESPACE : case T_DOC_COMMENT : continue 2 ; } } return $ tok ; } return false ; }
Lookahead at a token relative to the current position.

@param integer $distance
@return mixed Token as array / string or false on EOF.

@throws \InvalidArgumentException When the given distance is less than 0.
Lookahead at a token relative to the current position .