Re: Re: Singleton Pattern?

From: Date: Thu, 18 Mar 2004 23:18:38 +0000
Subject: Re: Re: Singleton Pattern?
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-26573@lists.php.net to get a copy of this message
On 18 Mar 2004 at 23:54, Michael Wallner wrote: > that's simple because of an PHP4 bug. Either assign > the object to $obj by value, or don't use a static > method variable for implementing the singleton > pattern in your package. Reply to myself :-)) I've found the corresponding bug report: http://bugs.php.net/bug.php?id=12454 It says that "Static variables just can't hold references of any kind. For objects it's avoidable with ZE2 because of the new object model.". At that time it was marked as a documentation-problem, should have been fixed and is marked fixed in CVS (documentation). So the problem seems to be of technical nature and maybe isn't fixable with the "old" Zend-engine (php 4.x). Could still somebody please try latest php 5? Thank you, Stefan

« previous php.pear.dev (#26573) next »