NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP 5 singleton/destructor question

David Mintz dmintz at davidmintz.org
Thu Mar 31 16:54:20 EST 2005


On Thu, 31 Mar 2005, csnyder wrote:

> On Thu, 31 Mar 2005 16:27:26 -0500 (EST), David Mintz
> <dmintz at davidmintz.org> wrote:
>
> > $db = MyDatabase::getInstance();
> > print $db->host_info;
> > ---
> >
> > OUTPUT
> > constructing MyDatabase...
> > localhost via TCP/IP


> ... and you expect to see "closing..." after the localhost line, right?
>

Aye, sir.

> Have you tried unset($db); to after print $db->host_info;?

I have indeed (as of just now). Same story.

Thanks,

---
David Mintz
http://davidmintz.org/



More information about the talk mailing list