<?php
class A {
static function b() {
echo "It works\n";
}
}
$theClass = "A";
$x = new $theClass;
/* Are any of the following legal? Which? */
A::b();
$x->b();
$theClass::b();
?>
Static Variable Variables
Comments
One response to “Static Variable Variables”
-
Have you actually tried running this? All three work. =b

Leave a Reply