Constants are available as long as the PHP process is executing. Destructors are called before a class instance is being wiped out from memory. But it does not remove a class or undefine a class. It works with instance. So a class constant never gets undefined. It stays with class definition.
- [PHP] Lifetime Brian Smither
- Re: [PHP] Lifetime shiplu