4 ms·
When a single script terminates, all the memory is deallocated. Basically, as you said, it's just like process termination in the OS.
by wvenable 16y ago
When a single script terminates, all the memory is deallocated. Basically, as you said, it's just like process termination in the OS.
- TimJYoung 16y agoThanks. That's what I thought, but I'm fairly new to PHP, and wasn't entirely sure.
- dan_netwalker 16y agoWell, in fact you could serialize/unserialize the objects and store them somewhere, making use of the "magic" functions __sleep() and __wakeup(), if I recall correctly. But yes, as soon as the web server ends the response or the script gets to the end, it's finished