What is difference between __sleep and __wakeup()?
_sleep() | _wakeup() |
---|---|
It is used to return the array of all the variables which need to be saved. | It is used to retrieve all the arrays returned by the _sleep() command. |
It is executed before the serialize() command. | Is executed before the unserialize() command. |
BY Best Interview Question ON 21 Jul 2020