Date: 04/29/98
- Next message: Bug Database: "[PHP-DEV] Bug #331 Updated: static variables in object methods broken"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Next in thread: Andreas Braukmann: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Reply: Andreas Braukmann: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> Good call. I can fix static so it would work inside objects, but I think
> it's generally a bad idea, as the same static variable would be shared
> among all objects of that type. You should really use some property
> instead, e.g. $this->a.
>
> I think the best thing would be generating a warning in case static is
> declared inside member functions, but I can also make it work like in
> regular functions. What do you guys think?
I think if we document the fact that the static is shared among that class
of objects, it is better than simply disallowing it. Who knows, maybe
this is useful to someone.
-Rasmus
- Next message: Bug Database: "[PHP-DEV] Bug #331 Updated: static variables in object methods broken"
- Previous message: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- In reply to: Zeev Suraski: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Next in thread: Andreas Braukmann: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Reply: Andreas Braukmann: "Re: [PHP-DEV] Bug #331: static variables in object methods broken"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

