public function skip(int $n) : int
    {
        if ($n <= 0) {
            return 0;
        }

        $skipped = 0;
        $skipLimit = min(self::MAX_SKIP_BUFFER_SIZE, $n);
        while ($skipped < $n) {
            $buf = $this->read(min($skipLimit, $n - $skipped));
            if ($buf === null) {
                break;
            }
            $skipped += strlen($buf);
        }
        return $skipped;
    }
public function skip(int $n) : int
    {
        if ($n <= 0) {
            return 0;
        }

        $skipped = 0;
        $skipLimit = min(self::MAX_SKIP_BUFFER_SIZE, $n);
        while ($skipped < $n) {
            $buf = $this->read(min($skipLimit, $n - $skipped));
            if ($buf === null) {
                break;
            }
            $skipped += strlen($buf);
        }
        return $skipped;
    }
public function skip ( int $ n ) : int { if ( $ n <= 0 ) { return 0 ; } $ skipped = 0 ; $ skipLimit = min ( self :: MAX_SKIP_BUFFER_SIZE , $ n ) ; while ( $ skipped < $ n ) { $ buf = $ this -> read ( min ( $ skipLimit , $ n - $ skipped ) ) ; if ( $ buf === null ) { break ; } $ skipped += strlen ( $ buf ) ; } return $ skipped ; }
Skips over and discards n bytes of data from this input stream.

@param int $n the number of bytes to be skipped
@return int the actual number of bytes skipped
@throws IOException
Skips over and discards n bytes of data from this input stream .