<?php rewind(resource $stream): bool
<?php { $stream = fopen('php://temp', 'w+b'); fwrite($stream, $contents); rewind($stream); return $stream; }
<?php private function rewindStream($resource): void { if (ftell($resource) !== 0 && stream_get_meta_data($resource)['seekable']) { rewind($resource); } } }
<?php try { $writeStream = fopen('php://temp', 'w+b'); fwrite($writeStream, $contents); rewind($writeStream); $this->writeStream($path, $writeStream, $config); } finally { isset($writeStream) && is_resource($writeStream) && fclose($writeStream);
<?php throw UnableToReadFile::fromLocation($path); } rewind($stream); return $stream; }
<?php $stream = fopen('php://temp', 'w+b'); fwrite($stream, $this->contents); rewind($stream); return $stream; }
<?php throw UnableToReadFile::fromLocation($path); } rewind($readStream); return $readStream; }