imagedestroy
imagedestroy
Destroy an image
true **imagedestroy** GdImage $image
Prior to PHP 8.0.0, freed any memory
associated with the resource. As of 8.0.0,
the GD extension uses objects instead of resources, and objects
cannot be explicitly closed.
imagedestroy``image
return.true.always
Voorbeeld: Using prior to PHP 8.0.0
<?php
// create a 100 x 100 image
$im = imagecreatetruecolor(100, 100);
// alter or save the image
// frees image from memory
imagedestroy($im);
?>