Hello,
I am passing a JSON'd feed from Twitter into my application, and sometimes Twitters API returns empty or incomplete feeds. This is causing a problem when I try to iterate the feeds using foreach
- does anyone know of a suitable test to find out if an object or array is iterable?
Could this be done with isarray($obj) || $obj instanceof Iterator
or are there any other cases I should look out for?
Thanks