ArrayIterator only uses public variables if an object is passed

`get_object_vars` only fetches public variables.

ArrayIterator only uses public variables. Even though `(array) $array` uses private and protected ones.
That shouldn't happen IMHO. But whatever PHP :P