(PHP 4, PHP 5, PHP 7, PHP 8)
imagedestroy — 销毁图像
Note:
此函数无效。在 PHP 8.0.0 之前,用于关闭资源。
在 PHP 8.0.0 之前,imagedestroy() 释放与图像 image
关联的所有内存。
成功时返回 true
, 或者在失败时返回 false
。
版本 | 说明 |
---|---|
8.0.0 | 此函数现在是 NOP(空操作)。 |
8.0.0 |
image 现在需要 GdImage 实例;之前需要有效的 gd resource。
|
Example #1 PHP 8.0.0 前使用 imagedestroy()
<?php
// create a 100 x 100 image
$im = imagecreatetruecolor(100, 100);
// alter or save the image
// frees image from memory
imagedestroy($im);
?>