Dont forget to put the name of your constant into single quotation mark. You will not get an error or a warning.
<?php
define("AMOUNT_OF_APPLES", 12);
if(defined(AMOUNT_OF_APPLES)){
//you won't get an output here
echo AMOUNT_OF_APPLES;
}
?>
so do instead
<?php
define("AMOUNT_OF_APPLES", 12);
if(defined("AMOUNT_OF_APPLES")){
//here you go
echo AMOUNT_OF_APPLES;
}
//output: 12
?>
It took me half an day to see it...