Re: PHP6 OOP compiler feature question / request
In case you miss it, this discussion is about breakages within the
same major version.
I am talking strictly from a Major Release standpoint, which is why I titled it PHP6 compiler features...
...
My understanding is that this type of change would be slightly massive undertaking to the compiler.
Essentially, its adding a context switch in the parser to allow certain words as methods within a class ONLY. An error should be thrown if someone is trying to redefine isset() in the global namespace. My reasoning being is that $baseball_player->catch() is a completely different context than try {} catch () {}.
possible to determine the context of a T_TRY token, but nonetheless,
it's bad practice to have functions named the same as reserved words
Thats a matter of opinion. I think its bad practice to think up a method name that is less concise in naming than what should have been allowed.
-ralph
Thread (11 messages)