Do you know what's the difference between __sleep and __wakeup?



Do you know what's the difference between __sleep and __wakeup?..

Answer / Amardeep

__sleep() is a magic method called during serialization of an object in PHP. It returns an array containing all the properties that should be serialized. The resulting array can then be unserialized using unserialize(). `__wakeup()` is a magic method called when an object is being unserialized.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How variables are passed through arguments?

1 Answers  


Is it possible multiple inheritance in php?

1 Answers  


Write a program to display a table of any given number?

1 Answers  


Which Scripting Engine PHP uses?

1 Answers  


Write the statements that are used to connect php with mysql

1 Answers  


How to execute an sql query?

1 Answers  


What is data structure in php?

1 Answers  


what mode to use when creating dirs with mkdir?

1 Answers  


What's diffrence between Get() and Post() Function

7 Answers  


is anybody upload more than 100mb file using PHP upload script in ONLINE SERVER (using .htaccess file)? please give some idea...

1 Answers  


What is the difference between Reply-to and Return-path in the headers of a mail function?

2 Answers  


Is it easy to learn php?

1 Answers  


Categories