What happens when you serialize data? Seriously, I’m being bothered about what’s the use of it, I have been searching through the web but they seem to give only the usage, not the reasons why to use it. .My task is to serialize data before inserting it as post_meta data in wordpress, and I’m a bit lost. Any help will be appreciated. Thanks.
What happens when you serialize data? Seriously, I’m being bothered about what’s the use
Share
Simply put, by serialization you can store an object in a transmittable and storable state. Converting an in-memory object to XML to send it to a SOAP service is serialization. PHP serializes your
$_SESSIONarray into a session file (at least by default). An ORM serializes your objects into an SQL query. JSON can represent serialized objects to be transferred between server and browser.As for your question, I don’t know how this applies to WordPress though or what your question actually is, perhaps you should show some code.