Hi Dmitry,

your patch fails with one test of mine. It may show a difference in the
conception we have of LSB's usage, consider the following snip:

------%<-------------------------------------
<?php

class A {
   public static function foo() {
       static::who();
   }

   public static function who() {
       echo __CLASS__."\n";
   }
}

class B extends A {
   public static function test() {
       A::foo();
   }

   public static function who() {
       echo __CLASS__."\n";
   }
}
B::test();

------%<-------------------------------------

Since the call A::foo() is completely defined and that no "fall back"
occurs, I guess "A" is more expected as a result of this script.
Your patch will return B. I discussed this matter quite heavily on
#php.pecl and the expectations were also that "A" should get returned here.

Now if returning "A" is what we really want for PHP's LSB, I'm not sure
whether it's easily doable with your patch. To bring my patch up
to date with the latest functionalities like constants access through
constant()/defined() and callbacks wouldn't require much work.

But if my patch, which uses a slightly different approach (which seems
to be simpler according to patch size), have no way to go in anyway, I'd
like to know it before
I start wasting time on it again.

Thanks in advance.

--
Etienne Kneuss
http://www.colder.ch

Men never do evil so completely and cheerfully as
when they do it from a religious conviction.
-- Pascal

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

Reply via email to