Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

is resource php 8

//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: #resource #php
ADD COMMENT
Topic
Name
6+2 =