|
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]
|