By takkie
via techblog.procurios.nl
Published: Jul 06 2009 / 09:01
While developing software like our framework you will need to cache a large data array to a file at some point sooner or later. At such a point you need to choose what caching method you will be using. In this article I will compare three methods: JSON, serialization and var_export() combined with include().
Comments
EllisGL replied ago:
There is one point that is somewhat wrong in the article. Talking about serialization: "Can not be used outside of a PHP application". Look at http://phpjs.org/functions/serialize:508 and http://phpjs.org/functions/unserialize:571
If you can do it in Javascript, then I'm sure you can do it anywhere.
takkie replied ago:
I meant to say that a PHP-serialized string can not be unserialized outside of PHP _natively_. Sure you can create custom functions to serialize and unserialize like PHP does.
EllisGL replied ago:
Ah ok! =)
Voters For This Link (19)
Voters Against This Link (0)