How to perform a preliminary assessment of the size of the file?

How to perform a preliminary assessment of the size of the generated file through the dumpFile class Symfony\Component\Filesystem?
In the class itself such options are not noticed.
Or still have to create a temporary file, and look how much he took?

Code:
use Symfony\Component\Filesystem\Filesystem;

$filesystem = new Filesystem();

$filesystem->touch($_SERVER['DOCUMENT_ROOT'] . $url);

$filesystem->dumpFile($_SERVER['DOCUMENT_ROOT'] . $url, $data); // 5797960 bytes

strlen($data); // 5236968 bytes
April 19th 20 at 12:21
0 answer

Find more questions by tags Symfony