phasync
BufferedStream / seek

Method

BufferedStream::seek

Seek to a position in the stream.

Description#

public BufferedStream::seek(
    $offset,
    $whence = SEEK_SET
): void

Parameters#

$offset
Stream offset
$whence = SEEK_SET
Specifies how the cursor position will be calculated based on the seek offset. Valid values are identical to the built-in PHP $whence values for fseek(). SEEK_SET: Set position equal to offset bytes SEEK_CUR: Set position to current location plus offset SEEK_END: Set position to end-of-stream plus offset.

Errors / Exceptions#

ExceptionWhen
RuntimeExceptionOn failure.