Re: Static vs. non static

From: Date: Mon, 23 Jan 2006 08:08:11 +0000
Subject: Re: Static vs. non static
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-21643@lists.php.net to get a copy of this message
Andi Gutmans wrote:
Yes, this was by design. Via class it should be ::method() and via object it should be ->method(). Why do you think this is wrong? I think it actually makes a lot of sense and don't see what we gain from allowing to call self->method(). If there's a good reason, I'd be open to it though.
I just gave a course in PHP5 OOP and this syntax overlap with static calls that do not end up being static seems confusing. If I get Marcus proposal properly he would then allow changing things from: parent::method(); to parent->method(); This would add a totally separate syntax, which would make it clear to users that this is in fact not a static call. It looks ugly, but I understand what he is aiming at. regards, Lukas

« previous php.internals (#21643) next »