On Mon, Oct 25, 2010 at 01:04:00AM +0200, Etienne Kneuss wrote:
> On Oct 25  0:56:28, Etienne Kneuss wrote:
> > > 
> > > I think you meant Bar to extend ActiveRecord? But anyway, I think
> > > that this particular call should be done through __call, not
> > > __callStatic, since it's basically non-static call. The line between
> > > the two wasn't really well-defined in PHP (you could call static
> > > methods non-statically and vice versa) which is a pity but I think
> > > distinction can be made in this case.
> > 
> > Exactly, if Bar::getFoo is not called statically, parent::getFoo() will
> > not be a static call, it should not get through __callStatic.
> > 
> > Best,
> 
> Oh, and #51176 seems bogus to me. "::" is not sufficient to indicate a
> static call, neither is "self::", "static::", or "Foo::".
> 
> A call is only static if one of the two following conditions match:
>     1) the target method is declared as static
>     2) the call comes from an object-less scope
> 

I think you perfectly got the point. However, being actually non-defined, we 
need to choose between __call() and __callStatic(), and i think that number 2 
is the only applicable criteria.

Note that for my problem, reverting commit 295706 in branch PHP_5_3 is enough 
to fix my problem, but it would break again 51176.

As this is a BC break compared to the 5.3.x series, IMHO it's the right way to 
go and then find another solution for 51176.

-- 
Giovanni Giacobbi

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to