<?php ftell(resource $stream): int|false
<?php $this->factory->sink($resource)->get('https://example.com'); $this->assertSame(0, ftell($resource)); $this->assertSame('abc123', stream_get_contents($resource)); }
<?php $contents .= $fread; } $ftell = ftell($handle); assert($ftell !== false); $this->tailPositions[$path] = $ftell; fclose($handle);
<?php private function rewindStream($resource): void { if (ftell($resource) !== 0 && stream_get_meta_data($resource)['seekable']) { rewind($resource); } }
<?php } $response->setCallback(function () use ($stream) { if (ftell($stream) !== 0) { rewind($stream); } fpassthru($stream);
<?php if (\DIRECTORY_SEPARATOR === '\\') { $except = array(); foreach ($write as $key => $socket) { if (!isset($read[$key]) && @\ftell($socket) === 0) { $except[$key] = $socket; } }