Re: [PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Stut
Colin Guthrie wrote: PS I know the above examples are contrived and that constructors would be more appropriate for the above - but using constructors is not always possible due to how you deal with failed initialisations where exceptions are not desirable. I see what you mean. You thought that

[PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Colin Guthrie
Stut wrote: > Colin Guthrie wrote: >> Stut wrote: >>> Colin Guthrie wrote: Stut wrote: > Stut wrote: >> In that case you need a new foo. That's the only way you're going to >> reset the internal static if the API doesn't give you a way to do it. >> >> $f=new foo(); >> $

Re: [PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Stut
Colin Guthrie wrote: Stut wrote: Colin Guthrie wrote: Stut wrote: Stut wrote: In that case you need a new foo. That's the only way you're going to reset the internal static if the API doesn't give you a way to do it. $f=new foo(); $f->bar(); $f->bar(); $g=new foo(); $g->bar(); Actually, scr

[PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Colin Guthrie
Stut wrote: > Colin Guthrie wrote: >> Stut wrote: >>> Stut wrote: In that case you need a new foo. That's the only way you're going to reset the internal static if the API doesn't give you a way to do it. $f=new foo(); $f->bar(); $f->bar(); $g=new foo(); $g->

Re: [PHP] Re: Strange behaviour of static declared content.

2007-10-19 Thread Stut
Colin Guthrie wrote: Stut wrote: Stut wrote: In that case you need a new foo. That's the only way you're going to reset the internal static if the API doesn't give you a way to do it. $f=new foo(); $f->bar(); $f->bar(); $g=new foo(); $g->bar(); Actually, scratch that, won't work. Not even uns

Re: [PHP] Re: Strange behaviour of static declared content.

2007-10-18 Thread Nathan Nobbe
On 10/18/07, Colin Guthrie <[EMAIL PROTECTED]> wrote: > > Stut wrote: > > Stut wrote: > >> In that case you need a new foo. That's the only way you're going to > >> reset the internal static if the API doesn't give you a way to do it. > >> > >> $f=new foo(); > >> $f->bar(); > >> $f->bar(); > >> $g=

[PHP] Re: Strange behaviour of static declared content.

2007-10-18 Thread Colin Guthrie
Stut wrote: > Stut wrote: >> In that case you need a new foo. That's the only way you're going to >> reset the internal static if the API doesn't give you a way to do it. >> >> $f=new foo(); >> $f->bar(); >> $f->bar(); >> $g=new foo(); >> $g->bar(); > > Actually, scratch that, won't work. Not even

[PHP] Re: Strange behaviour of static declared content.

2007-10-18 Thread Colin Guthrie
Joshua Bacher wrote: >> [EMAIL PROTECTED] ~/working/www/siuConference $ php testScript.php >> FUBeyondAllR >> already defined >> FUBeyondAllR >> >> -nathan > > thats the solution for the wrong problem. it's not up to me to change > the API. the API is designed like i noted and i need a way to get