At 01:48 AM 3/10/2001 +0100, André Langhorst wrote:
>>I still don't understand what the problem is? What should be documented
>>is the right way to use these calls.
>
>problem 1 : how do I call the "::" operator and how do I call what it does
>if it is no static call.
It does:
a) Calls an ancestor's method which can rely on $this
b) Another classes method (unrelated) which shouldn't rely on $this
>problem 2 : the "bug" with incorrect $this I mentioned, it is at least
>unexcpected and should be documented (that you can't rely on $this using
>"::" ) but since no one likes undefined behaviour it would be fine to see
>it fixed - my opinion is that using "::" $this should never be set to
>anything...
Every language implementation including C/C++ has undefined/unexpected
behavior when you use constructs in ways they aren't meant/documented for.
There is nothing to fix here like there's nothing to fix in gcc. It happens
that $this is meant to propogate with a :: call because it is meant to work
in case 1) above.
>>PEAR relies on the $this being correct even when you call a method which
>>is not in the current class or in one of its parent classes?
>
>no, it simply uses "::" that is an undocumented feature
:: should be documented in the way I mentioned above.
>>Where can I see the documentation? (Any chance you can send it here to
>>save me the time? :).
>>We just need to be sure we don't document things which aren't necessarily
>>supposed to work.
>
>http://toye.php.net/~andre/html/keyword.newref.html
I'll try and read through this tomorrow.
Andi
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]