|
Posted by howa on 06/04/07 15:58
On Jun 4, 10:34 pm, gosha bine <stereof...@gmail.com> wrote:
> Yet again, "$a = new Foo" actually creates TWO objects in php4. The
> first one is an anonymous object created by "new" and the second one is
> the object the variable "$a" points to. This behavior is ineffective AND
> it doesn't work in certain cases, e.g singletons.
>
but using a static function variable made singleton possible (in
PHP4), as my example above, both ways are working...
[Back to original message]
|