What’s the special meaning of __sleep and __wakeup?
Answer Posted / Sohan Sagar Jha
In PHP, `__sleep` and `__wakeup` are magic methods used for serialization (converting an object into a format that can be stored or transmitted) and unserialization (recovering data from the serialized format). The `__sleep` method returns an array of properties that should be serialized while the `__wakeup` method is called after an object has been unserialized.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What sized websites have you worked on in the past?
how to detect a mobile device using php
if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer
Tell me what kind of things have you done on the social side?
What is difference between static and final in php?
What is the current stable version of php?
hello all, I need some sample placement papers in lion bridge.. can anyone help me?
What is the current stable version of php? What advance thing in php7?
Write a program using while loop?
Name and explain five of the PHP error constants?
What is trait in php?
How to create a web form?
What does $_files means?
Which variable declarations within a class is invalid in php?
What is the difference between htmlentities() and htmlspecialchars()?