Possible duplicate:
Can I get CONST in a PHP class?
Is it possible to get all defined constants from a class? That is, I have the following class:
class Cl {
const AAA = 1;
const BBB = 2;
}
and I would like to get an array:
array (
'AAA' => 1,
'BBB' => 2,
)
source
share