php - Way to verify if variable is a valid GD image resource? -


i have class accepts gd image resource 1 of arguments. far know, there no way type hint since resource , not object. there way validate whether supplied argument valid gd image resource (aside further functionality using resource failing)?

ps: please not mention imagemagick in answer...

the get_resource_type function should out. short of writing code , seeing return, i'm not sure it's going gd resource, you're on own there. should starting point, though!


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -