Home >Backend Development >PHP Tutorial >What are the benefits of PHP serialization and deserialization?_PHP Tutorial

What are the benefits of PHP serialization and deserialization?_PHP Tutorial

WBOY
WBOYOriginal
2016-07-21 14:55:50766browse

Question:

PHP serialize serialize. The manual says that it can convert an array or object into a string to facilitate transmission and storage.
But I don’t know when to use it and when not to use it?
For example, I want to make a news system, which contains title, author, content, publication time, and many other fields. During transmission, I will serialize
it into a string and store it in the database. , there is no need to create a lot of fields in the database
and then deserialize them when used. Is this better than not serializing and building a lot of fields to store?

Answer:

Can convert an array or object into a string for easy transmission and storage.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/364384.htmlTechArticleQuestion: PHP serialize serialize, the manual says that it can convert an array or object into a string for easy transmission and storage, but I don’t know when to use it and when not to use it? ...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn