How can I check if a constant is defined in a PHP class?
class Foo { const BAR = 1; }
Is there something like property_exists()
property_exists()
You can check if a constant is defined with the code below: