Interesting news about new features in PHP, namely LSB (Late Static Binding).
What this basically means is that you can overload static functions, which is great news for all you singleton lovers out there.
And a nice leap forward in PHP code design, want an example? Read on...
UPDATE: the PHP website is updated now with a official documentation about the feature: http://docs.php.net/manual/en/language.oop5.late-static-bindings.php
The static reference is going to be prefixed with the 'static' keyword, meaning you'd get something like this:
<?php
class ClassA {
public static function getFoo() {
return self::foo();
}
public static function getFooLSB() {
return static::foo();
}
public static function foo() {
return 'no foo!';
}
}
class ClassB extends ClassA {
public static function foo() {
return 'foo!';
}
}
echo ClassB::getFoo(); // 'no foo!'
echo ClassB::getFooLSB(); // 'foo!'
?>
A nice detailed explanation can be found (once again) on Etienne Kneuss his blog: http://www.colder.ch/news/08-24-2007/28/late-static-bindings-expl.html