Re: [PATCH] Late Static Binding

From: Date: Wed, 01 Mar 2006 16:48:14 +0000
Subject: Re: [PATCH] Late Static Binding
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Zeev Suraski wrote:
At 16:50 01/03/2006, Lukas Smith wrote:
Dmitry Stogov wrote:
1) I would very like to see some real example where "static" is necessary?
I think Mike illustrated this in his post. Or do you want a "real" world example?
2) "static" is really bad name. I suggest "caller", Marcus thought about "class".
I dont really see an issue with calling the thing "static" considering its about late static binding. Also AFAIK this name was agreed upong in Paris. A meeting you also attended.
I actually don't recall there was consensus on even adding this feature in the Paris meeting, let alone how to name it.
but there is a problem no? as illustrated by: http://blog.joshuaeichorn.com/archives/2006/01/09/zactiverecord-cant-work/ I ran into this problem with Ard Biesheuvel with php5beta3. he considered the fact that 'self' didn't resolve to the actual class being called a flaw, I argee with him.
Either way, implementation wise, as Dmitry said - storing runtime information in zend_function or zend_op_array is simply out of the question.
do you agree that 'a' feature is needed to satisfy the illustrated problem(s)? kind regards, Jochem {simpletons idea ...} rather than an alternative form of static method calling or a new class related keyword, maybe a new magic constant would be sufficient? e.g. __CCLASS__ (C for 'Called') or __OWNER__ (the class the 'owns' the method? [from the view point of the caller])
Zeev


Thread (59 messages)

« previous php.internals (#22056) next »