I am working with an object returned from a class. For some reason, the class spills out an object with numbered properties (0, 1, 2, etc.). I need to check if the object is empty. The standard empty(get_object_vars($obj)) trick empty(get_object_vars($obj)) will not work, because get_object_vars returns an empty array, even if the object has (numbered) properties.
For reference, the object I'm working with is the one that returns the PHP ZipCode legislators method for the Sunlight API. You can see print_r model answer here .
source share