Skip to content

Working with Pimf_Util_Serializer

g.krsteski edited this page Jun 3, 2014 · 4 revisions


Due to PHP Bug #39736 - serialize() consumes insane amount of RAM. Now PIMF can put objects, strings, integers or arrays. Even instances of SimpleXMLElement can be put too! If igbinary a ultra-fast PHP extention compiled than PIMF uses igbinary_serialize or igbinary_unserialize. Igbinary is a drop in replacement for the standard php serializer. Instead of time and space consuming textual representation, igbinary stores php data structures in compact binary form.


$serializedItem = \Pimf\Util\Serializer::serialize($item);


$item = \Pimf\Util\Serializer::unserialize($serializedItem);