Sometimes we have a chunk of arbitrary data—a string, a float or something more complex, such as an array of arrays—that we need to persist until some later point.
A nice real-world example of a mechanism that facilitates this, though certainly not the only one, is the WordPress Options API. Using this, I mostly don’t need to worry about the shape or size of my data; I just pass it across and, through some magic, will be able to retrieve it sometime in the future.
Continue reading “Saving Space by Using JSON Inside Serialized PHP”