Re: [suspicious - maybe spam] Static Keyword

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Paul Higgins wrote:
Hi,

I was reading this article: http://www.phppatterns.com/index.php/article/articleview/6/1/1/ .

I have a question about it. If you create this static Singleton object, does it persist in memory globally? Or is it recreated each time a .php page is requested?


AFAIK singletons are used so that you only have one object of that type *for a request*. The singleton is created and destroyed on every request (as are all objects).



-- Teach a person to fish...

Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://php.net/manual/
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux