Working with Pimf_Util_Serializer

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

Serializer

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.

Serialize

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

Unserialize

$item = \Pimf\Util\Serializer::unserialize($serializedItem);
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.