Calling a static method on a class known by name?
Posted
by Palantir
on Stack Overflow
See other posts from Stack Overflow
or by Palantir
Published on 2010-06-09T09:57:42Z
Indexed on
2010/06/09
11:12 UTC
Read the original article
Hit count: 159
php
Hello!
Is there any way to obtain this effect in a PHP version prior to 5.3?
class A {
public static function x() {print 'ok'; }
}
$className = 'A';
$className::x();
Thanks! Palantir
© Stack Overflow or respective owner