Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

is_resource returns false

//Starting with PHP 8.0, get_resource_type or is_resource with a GD image argument, 
//will throw a Fatal Error, we should use get_class
  
  function is_gd_image($var) : bool {
    return (gettype($var) == "object" && get_class($var) == "GdImage");
}
 
PREVIOUS NEXT
Tagged: #returns #false
ADD COMMENT
Topic
Name
2+2 =