On 11/1/07, Eric Butera <[EMAIL PROTECTED]> wrote:
>
> I don't know if this has been said yet, but in 5.3 they added this:
> Dynamic static calls: $c = "classname"; $c::someMetod();
apparently it works in 5.2.4 as well:
<?php
class Foo {
static public function staticMethod() {
echo __METHOD__ . PHP_EOL;
}
public function nonStaticMethod() {
echo __METHOD__ . PHP_EOL;
}
}
$fooStr = 'Foo';
$fooStr::staticMethod();
Foo::staticMethod();
Foo::nonstaticMethod();
$foo = new Foo();
$foo->staticMethod();
$foo->nonstaticMethod();
?>
-nathan