Hacker News new | ask | show | jobs
by hexciple 30 days ago
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.