Description
The following code:
<?php
ob_start();
imagepng($resource, null, 98);
$contents = ob_get_clean();
ob_end_flush();
var_dump($contents);
Resulted in this output:
But I expected this output instead:
ERROR
or:
$content = <<<Binary data here >>>
Tested on php 7.3 but I think it is also applicable for other version using gd.
PHP Version
PHP 7.3.33
Operating System
Ubuntu 20.04