Consider this script
class B
{
static public function hi() { echo "hi\n"; }
}
class A
{
private $name = 'B';
public function __construct()
{
// This doesn't parse
// $this->name::hi();
// But this works fine
$class = $this->name;
$class::hi();
}
}
new A();
Any idea how/if I could get the first example $this->name::hi(); to parse and work?
$class::hi()should work in 5.3.$this->$name::hi(), looks like it should be$this->name, that's probably the problem.