How to check if a class constant exists?
Reading Time: < 1 minutes Sometimes it’s useful to know whether a certain class constant exists or not. This is a very quick and painless way to find that out: [php] if(defined(‘myClass::CONSTANT’)) { // CONSTANT is defined within myClass } Read More …