The list of backwards-incompatible changes for PHP 7.4 contain the following note:
Serialization
The o serialization format has been removed. As it is never produced by PHP, this may only break unserialization of manually crafted strings.
(Note that this is referring to a little-o
, not the big-O
format which is used for object serialization.)
It seems this was never generated by PHP's serialize()
function, but the fact that this note exists implies that it was recognised by the unserialize()
function.
I've done a little test fiddle (3v4l.org) which shows this was not simply a synonym for big-O
, which would be one obvious possibility.
The fiddle exposes the changes in PHP by the differences in the error message that is output. In PHP >= 7.4 we get an error at position 0 (where the o
is encountered) whereas prior to 7.4 the error was reported at position 5 (where the data is located). This implies that o
was recognised but the data is in the wrong format, which ties in with what I've already deduced, above.
So, what was the o
serialization format, what did it deserialize to and why did PHP support such a feature if it didn't actually generate it, itself?