How to find if an object is empty or not in PHP.
Following is the code in which $obj is holding XML data. How can I check if it\'s empty or not?
$obj
You can cast your object into an array, and test its count like so:
if(count((array)$obj)) { // doStuff }