I always thought that the PHP session was stored in a standard
serialize format, and then I tried
unserialize to use it to find out that it was another serialization, just like the following
login_ok|b:1;nome|s:4:"sica";inteiro|i:34;
So the question comes, since PHP own a set of Serialize method, and the efficiency is quite high, why in the session also to engage in another unwinnable method?
Reply content:
I always thought that the PHP session was stored in a standard serialize format, and then I tried unserialize to use it to find out that it was another serialization, just like the following
login_ok|b:1;nome|s:4:"sica";inteiro|i:34;
So the question comes, since PHP own a set of Serialize method, and the efficiency is quite high, why in the session also to engage in another unwinnable method?
The encapsulated session should be read with the session, trying to solve its original code is very dirty, the PHP development team should not consider similar requirements.
Second, the serialize is not fast, and the code is huge, because it supports the serialization of objects, __sleep magic methods, and does not match the scenes stored in the session.