stream_copy_to_stream

Supported Versions: PHP 5, PHP 7, PHP 8
Copies data from one stream to another
<?php stream_copy_to_stream(    resource $from,    resource $to,    ?int $length = null,    int $offset = 0): int|false
<?php     public function dimensions()

    {

        stream_copy_to_stream($this->storage->readStream($this->path), $tmpFile = tmpfile());



        return @getimagesize(stream_get_meta_data($tmpFile)['uri']);

    }