src/Stream/Stream.php
public function peek($characters)
    {
        if ( strlen($this->stream_string) < $this->strpos + $characters ) {
            throw new StreamBufferTooSmallException('Not enough of the stream available.');
        }

        return substr($this->stream_string, $this->strpos, $characters);
    }
public function peek($characters)
    {
        if ( strlen($this->stream_string) < $this->strpos + $characters ) {
            throw new StreamBufferTooSmallException('Not enough of the stream available.');
        }

        return substr($this->stream_string, $this->strpos, $characters);
    }
public function peek ( $ characters ) { if ( strlen ( $ this -> stream_string ) < $ this -> strpos + $ characters ) { throw new StreamBufferTooSmallException ( 'Not enough of the stream available.' ) ; } return substr ( $ this -> stream_string , $ this -> strpos , $ characters ) ; }
Get characters from the string but don't move the pointer

@param $characters

@return string
@throws StreamBufferTooSmallException
Get characters from the string but don t move the pointer