I have a class that takes a GD image resource as one of its arguments. As far as I know, there is no way to type hint this, as this is a resource, not an object. Is there any way to check if the provided argument is a valid GD image resource (other than additional functions using this resource)?
PS: Please do not mention ImageMagick in your answer ...
source share