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

2007-10-19 Thread Stut
Nathan Nobbe wrote: On 10/18/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: On 10/18/07, Joshua Bacher <[EMAIL PROTECTED]> wrote: 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 around this behaviour. thanks f

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

2007-10-18 Thread Joshua Bacher
> [snip] > to be honest i meanwhile have a workaround. > [/snip] > > How about extending the API class and putting the function within the > extended class that you need? it's only partially a solution since the API will change. therefore the expressions in the if statement maybe will change.

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

2007-10-18 Thread Jay Blanchard
[snip] to be honest i meanwhile have a workaround. [/snip] How about extending the API class and putting the function within the extended class that you need? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

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

2007-10-18 Thread Joshua Bacher
> >>>I can't touch the API. > >>> > >>>i have never use static variables inside of functions and likely > >>>never will. > >>>go for static class variables instead :) > >>> > >>> >>>class foo{ > >>>public static $foobar = false; > >>>public function bar(){ > >>>

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

2007-10-18 Thread Stut
Stut wrote: Joshua Bacher wrote: I can't touch the API. i have never use static variables inside of functions and likely never will. go for static class variables instead :) bar(); $f->bar(); foo::$foobar=false; $f->bar(); ?> [EMAIL PROTECTED] ~/working/www/siuConference $ php testScrip

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

2007-10-18 Thread Nathan Nobbe
On 10/18/07, Nathan Nobbe <[EMAIL PROTECTED]> wrote: > > On 10/18/07, Joshua Bacher <[EMAIL PROTECTED]> wrote: > > > > 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 around > > this behaviour. > > > > thank

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

2007-10-18 Thread Nathan Nobbe
On 10/18/07, Stut <[EMAIL PROTECTED]> wrote: > > Joshua Bacher wrote: > >> I can't touch the API. > >> > >> i have never use static variables inside of functions and likely never > will. > >> go for static class variables instead :) > >> > >> >> class foo{ > >> public static $foobar =

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

2007-10-18 Thread Nathan Nobbe
On 10/18/07, Joshua Bacher <[EMAIL PROTECTED]> wrote: > > 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 around > this behaviour. > > thanks for your idea any further suggestions? > > josh > unfortunately i

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

2007-10-18 Thread Stut
Joshua Bacher wrote: I can't touch the API. i have never use static variables inside of functions and likely never will. go for static class variables instead :) bar(); $f->bar(); foo::$foobar=false; $f->bar(); ?> [EMAIL PROTECTED] ~/working/www/siuConference $ php testScript.php FUBeyondA

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

2007-10-18 Thread Joshua Bacher
> I can't touch the API. > > i have never use static variables inside of functions and likely never will. > go for static class variables instead :) > > class foo{ > public static $foobar = false; > public function bar(){ > static $foobar=false; >

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

2007-10-18 Thread Nathan Nobbe
On 10/18/07, Joshua Bacher <[EMAIL PROTECTED]> wrote: > > Hi all, > > i faced the following problem. > > i am using a API. This API has a class that looks like following: > > class foo{ > public function bar(){ > static $foobar=false; > if ($foobar === False

[PHP] Strange behaviour of static declared content.

2007-10-18 Thread Joshua Bacher
Hi all, i faced the following problem. i am using a API. This API has a class that looks like following: class foo{ public function bar(){ static $foobar=false; if ($foobar === False){ $foobar='FUBeyondAllR';