public function bytesLeft(): int
    {
        if (null === $this->handle || !is_resource($this->handle)) {
            throw new \LogicException('Can not read from closed input stream.');
        }

        $bytesRead = ftell($this->handle);
        if (!is_int($bytesRead)) {
            return 0;
        }

        return $this->getResourceLength() - $bytesRead;
    }
public function bytesLeft(): int
    {
        if (null === $this->handle || !is_resource($this->handle)) {
            throw new \LogicException('Can not read from closed input stream.');
        }

        $bytesRead = ftell($this->handle);
        if (!is_int($bytesRead)) {
            return 0;
        }

        return $this->getResourceLength() - $bytesRead;
    }
public function bytesLeft ( ) : int { if ( null === $ this -> handle || ! is_resource ( $ this -> handle ) ) { throw new \ LogicException ( 'Can not read from closed input stream.' ) ; } $ bytesRead = ftell ( $ this -> handle ) ; if ( ! is_int ( $ bytesRead ) ) { return 0 ; } return $ this -> getResourceLength ( ) - $ bytesRead ; }
returns the amount of bytes left to be read

@return  int
@throws  \LogicException
returns the amount of bytes left to be read