The constructor is only called once: when the object is created (with the new
keyword, in your case new GeoIP()
).
James Skidmore
2009-12-10 21:23:48
The constructor is only called once: when the object is created (with the new
keyword, in your case new GeoIP()
).
The answer is no, as the object is not being reconstructed. What is called however are the magic __sleep() and __wakeup() methods, the first when you store it to $_SESSION
and the second when you retrieve it.
You should take a quick look at this thread to make sure you've considered some of the problems of using $_SESSION to store objects.