[dev] Re: [cvs] commit: horde/lib Horde.php
Michael M Slusarz
slusarz at bigworm.colorado.edu
Thu Apr 3 20:27:03 PST 2003
Quoting Jan Schneider <jan at horde.org>:
| Quoting Chuck Hagenbuch <chuck at horde.org>:
|
| > chuck 2003/04/03 18:52:17 PST
| >
| > Modified files:
| > lib Horde.php
| > Log:
| > Can't assign references to static variables.
|
| Uh, why not? We do this all over the places without problems so far.
Chuck is correct. This one bit me in the rear a few months ago when I was
writing a module with a singleton() method. The $instances variable is
static, and i was doing a $instances = &new Foo; Sure enough, the next
time singleton was called, the previous $instances was nowhere in sight and
a brand new class had to be instantiated. It talks about this somewhere in
the PHP manual (I think it's fairly buried).
michael
______________________________________________
Michael Slusarz [slusarz at bigworm.colorado.edu]
The University of Colorado at Boulder
More information about the dev
mailing list