Re: [PATCH] Late Static Binding

From: Date: Thu, 02 Mar 2006 21:38:38 +0000
Subject: Re: [PATCH] Late Static Binding
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to [email protected] to get a copy of this message
Yep. I was thinking mainly of methods not of static variables. I still think this:: is the best way (better than class::)


At 12:12 PM 3/2/2006, Jeff Moore wrote:

On Mar 2, 2006, at 2:23 PM, Andi Gutmans wrote:
Do you expect significant BC breakage?
Hello Andi, Here is an example where changing self to late binding would change behavior: class A {
        static $a = "hello world";
        static function getA() {
                return self::$a;
        }
} class B extends A {
        static function dosomething() {
                echo self::getA();
        }
} B::dosomething(); If self becomes late binding, the location of self::$a jumps from A to B, where it is undefined. Is kind of thing significant in the wild? I don't know. Regards, Jeff


Thread (59 messages)

« previous php.internals (#22096) next »