What is serialization / object serialization ?
Answers were Sorted based on User's Feedback
Answer / sloog
Serializing an object means converting it to a bytestream
representation that can be stored in a file. This is useful
for persistent data; for example, PHP sessions automatically
save and restore objects. Serializatioin in PHP is
mostly automatic--it requires little extra work from you,
beyond calling the serialize() and unserialize() functions:
$encoded = serialize(something);
$something - unserialize(encoded);
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / ranjan
Say we have some information in the form of object or array
and we want to store that into database then we should
serialize that and then we can store the returned string in
the database. While accessing we will have to unserialize that.
Also if we want to play with the string before we store the
above string into the database then we need to use it
everytime by unserializing it.
We can avoid this if we register this iobject with the
session and then nsession will automatically unserialize it
and we need not to unserialize it before playing or while
storing
| Is This Answer Correct ? | 0 Yes | 1 No |
How can we upload a php + mysql Site
What is == and === in php?
Why laravel is best php framework?
Explain what does the expression exception::__tostring means?
How can I find what type of images that the PHP version supports?
Tell me what does pear stands for?
Hi this is amul jani here, i complied my graduation in B.com stream.. but as career i looking for PHP language.. to get shape my career. so is that possible to enter in IT world.. for me how much scope of develop my career in this field.. amul jani
How do I find out the number of parameters passed into function9?
What is class extend in php?
What is the maximum size of a file that can be uploaded using PHP and how can we change this?
What does $globals means?
Whats the difference between include() and require()?