Give a speed kick to combined is_serialized() + is_serialized_string() + maybe_unserialize() usage
|Reported by:||hakre||Owned by:|
In #17129 is_serialized_string() has been speed up by 23%. That was for the function itself.
However, that function is used in contexts that make the call to is_serialized() directly or indirectly via maybe_unserialize().
Most often these calls are redundant and must not be done at all.
If preconditions are already met, is_serialized_string() can be replaced with a simple check for the 's' or 'S' format and maybe_unserialize() can be replaced with @unserialize($data) as that's the code executed in maybe_unserialize() when is_serialze() had returned true on $data;