When a SESSION in PHP transmits an object, the object cannot have a constructor. in the afternoon, I want to sort out a CLASS, refine it, and use a _ construct () constructor, after several hours, I could not log on again. I checked the program for half a day. it turned out that when the session in php passed the class object, the object could not have a constructor. It really killed me. But why? is it because objects with constructors cannot be serialized? When a SESSION in PHP uploads an object, the object cannot have constructors.
In the afternoon, I want to sort out a CLASS and refine it. I used a _ construct () constructor. after several hours, I could not log on again. I checked the program for half a day, it turns out that when a class object is passed through a session in php, the object cannot have constructor. it's really killing me. But why? is it because objects with constructors cannot be serialized?