Just came across something interesting.
This is the first time I see an API that offers a serialized php object as one of the possible formats in which it returnes data.
I get it now. It’s just an array. They call it serialized php object, but it’s just a serialized array. Now bad, I’ve never seen APIs that return pure raw php data, but why not - JSON is just a pure javascript object, so why not return php.
I’d fear unserializing untrusted data. unserialize() can have side effects. They have the power to make you create objects, and objects can have behavior. __wakeup(), and the other functions that might get executed if the class is undefined. Not to mention the possible errors that can result.