Re: [patch] Late static bindings (LSB)

php.internals

Stefan Walk

18 years ago
Is it possible or feasible to distinguish betwenn parent:: and NameOfParentClass::? That would allow to push a call "up" while preserving the called name while not making Class:: mean different things depending on the location of the call, which is a very bad thing IMO (it's an effect that may not be desired). Regards, Stefan

Dmitry Stogov

18 years ago
From technical point of view it is possible to propagate LSB with self::, parent::, and static:: and not with CLASS::. I think it may be a good compromise. Thanks. Dmitry.

Mike Lively

18 years ago
> From technical point of view it is possible to propagate LSB with self::, > parent::, and static:: and not with CLASS::. > I think it may be a good compromise.
I am very much in favor of this. I think it allows the greatest amount of control. If you need a specific class's static method called then passing that class' name is the best idea. i would question wether it is a good idea to make self:: work like that though.

Marcus Börger

18 years ago
Hello Dmitry, this is a good idea imo. It sounds like the most natural solution - to me. marcus Thursday, September 20, 2007, 12:04:04 PM, you wrote:
> From technical point of view it is possible to propagate LSB with self::, > parent::, and static:: and not with CLASS::. > I think it may be a good compromise.
> Thanks. Dmitry.
>> -----Original Message----- >> From: Stefan Walk [mailto:et@php.net] >> Sent: Thursday, September 20, 2007 1:10 PM >> To: Dmitry Stogov; internals@lists.php.net >> Subject: Re: [PHP-DEV] [patch] Late static bindings (LSB) >> >> >> Is it possible or feasible to distinguish betwenn parent:: >> and NameOfParentClass::? That would allow to push a call "up" >> while preserving the called name while not making Class:: >> mean different things depending on the location of the call, >> which is a very bad thing IMO (it's an effect that may not be >> desired). >> >> Regards, >> Stefan >>
Best regards, Marcus

Stanislav Malyshev

18 years ago
> Is it possible or feasible to distinguish betwenn parent:: and > NameOfParentClass::? That would allow to push a call "up" while
I'm not sure I understand - what's the difference? Can you give an example?
-- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com