Just had a bug the other day where we were array_filter and then feeding the results into json_encode. If you feed a sparse array into that, you get an object, not an array, which can then cause JavaScript Problems.
I wasn't aware of either of those behaviors going into that debugging session.
I wasn't aware of either of those behaviors going into that debugging session.