I need to use constant as class name for acces to this class static property, that is
class a {
public static $name = "Jon";
}
define("CLASSNAME", "a");
echo CLASSNAME::$name;
this returns error, that class CLASSNAME not exists.
There is some solution ?
It’s possible with reflection:
If it is a good design choice is another question…