[PHP-DEV] Re: Static vars in methods

2001-03-09 Thread Andi Gutmans
Yeah, it's supposed to be this way. We copied C++. Andi At 10:50 AM 3/9/2001 -0600, Andrei Zmievski wrote: Just ran into something (well, actually searching for it) and wanted to know what everyone's thoughts on this were and whether it should stay that way. ?php class Foo { function

[PHP-DEV] Re: Static vars in methods

2001-03-09 Thread Andrei Zmievski
On Fri, 09 Mar 2001, Andi Gutmans wrote: We need to think of static class variables. I don't think it's very easy to do this in a way which wouldn't cause a general performance loss but I'll put on my thinking cap. Ok, I was gonna try to hack it in myself, but you are obviously more

[PHP-DEV] Re: Static vars in methods

2001-03-09 Thread Andrei Zmievski
On Fri, 09 Mar 2001, Andi Gutmans wrote: Yeah, it's supposed to be this way. We copied C++. Ok, so I can rely on this behavior in the future. On a similar note, what about static class variables, can those be done? -Andrei * What were the first 15 billion years of the universe like for you? *

[PHP-DEV] Re: Static vars in methods

2001-03-09 Thread Andi Gutmans
By the way, if you need something that works you can just add the following line in your constructor: $this-mystatic = $GLOBALS["__myclass_mystatic"]; Then use $this-mystatic in all of your methods. It's not built-in but it should work pretty nicely. Andi At 11:02 AM 3/9/2001 -0600, Andrei

[PHP-DEV] Re: Static vars in methods

2001-03-09 Thread Andrei Zmievski
On Fri, 09 Mar 2001, Andi Gutmans wrote: By the way, if you need something that works you can just add the following line in your constructor: $this-mystatic = $GLOBALS["__myclass_mystatic"]; Then use $this-mystatic in all of your methods. It's not built-in but it should work pretty