You are here: Re: Singleton design pattern relveance in PHP « All PHP « IT news, forums, messages
Re: Singleton design pattern relveance in PHP

Posted by ZeldorBlat on 10/11/96 11:59

Bit Byte wrote:
> Since the webserver loads a PHP script every time a request is issued
> from a client, it seems that Singletons are unnessesary in PHP?, since
> each time an object is invoked, it is (guaranteed?) to be the only
> instance - at least for that thread that is handling the request ? No ?
>
> If I am missing something quite obvious, please let me know.

<?php
//Thread starts

$a = new Foo();
$b = new Foo();

//Now have two instances of Foo, all in the same thread -- no
guarantees here

//Thread ends
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация