Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

if gd is image

//Starting with PHP 8.0, get_resource_type with a GD image argument, will throw a Fatal Error:
function is_gd_image($var) : bool {
    return (gettype($var) == "object" && get_class($var) == "GdImage");
}
 
PREVIOUS NEXT
Tagged: #gd #image
ADD COMMENT
Topic
Name
4+1 =