I'm starting to use classes in PHP and im trying to get used to them...
they seem not that hard and they look awesome but i found something i don't know if it's even possible or how to go about it...
Well the thing is let's say i have a constant declared in the class and i want to be able to instantiate that class. Nice, but now when i instantiate it and try to echo the const it shows nothing... So what did i do? i tried to __construct it like:
Code: Select all
function __construct(){
$this->CONST = self::CONST;
}SO, my question: Is there any way I can get my const instantiated and be able to show it without modifying it?? Or Am I doing something wrong??
Thx in advance!!