I am in the middle of building a cache layer for the Redis DB to my application and I have come to the point where’s it’s about to take care of arrays.
I wonder if there’s any good (high performance!) way of controlling an string to be serialized or not with PHP?
Thanks a lot!
The
$string !== 'b:0;'checks to see if the serialized string may have been the valuefalse. If this check is important to you you may want totrimthe serialized string or otherwise preprocess it to make sure this works.