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 |
Explain the ternary conditional operator in php?
what is this error "Call to unsupported or undefined function mysql_connect();" and when you will get this?
What is strlen php?
What the difference between WAMP5 1.7.3 and WampServer 2?
What is reference variable php?
Is php a case sensitive language?
What's the diff. between include() and Include_once().
Is php faster than javascript?
how to use between operator when retrieve from database(format-2008-jun-06)
How can we automatically escape incoming data?
Define urlencode() and urldecode() used in php?
How to remove duplicate values from array using php?