I need to assign a class (not an object) to a variable. I know this is quite simple in other programming languages, like Java, but I can't find the way to accomplish this in PHP.
This is a snippet of what I'm trying to do:
class Y{
const MESSAGE = "HELLO";
}
class X{
public $foo = Y; // <-- I need a reference to Class Y
}
$xInstance = new X();
echo ($xInstance->foo)::MESSAGE; // Of course, this should print HELLO