Question and answer is powered by AnsPress.io
I have applied sizeof function to count stdclass object in PHP but it does not count properly, got an error.
My Code:
sizeof($MyArray)
If you want to count stdclass object in PHP, apply this code.
count((array)$MyArray)
Hope it will be helpful for you.