I serialized an object of PHP class in Laravel. Afterwards, I changed the class definition adding a new method and when I unserialize the old object and make a call to that newly implemented method, it works.
I wonder why and how?
I serialized an object of PHP class in Laravel. Afterwards, I changed the class definition adding a new method and when I unserialize the old object and make a call to that newly implemented method, it works.
I wonder why and how?
Because serialization process keeps only state of the objects (fields) but not your methods with implementation.