note 98805 deleted from language.oop5.patterns by danbrown
| From: | danbrown@php.net | Date: | Thu, 08 Jul 2010 17:14:29 +0000 |
| Subject: | note 98805 deleted from language.oop5.patterns by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170801@lists.php.net to get a copy of this message | ||
Note Submitter: papadomitsos at AINTGOTNOSPAMezgr dot net
----
The singleton paradigm presented above operates correctly in the context of the execution/request,
it will not *automatically* maintain state (as may be the case with Java) between different script
executions/requests. Feel free to use sessions along with serialize()/unserialize() and
__sleep()/__wakeup() to maintain state for you singleton (and other) classes.