Well as I've learned today with constants, if you want to check if they are defined you use, well, defined() except it doesn't seem to work as expect
given:
define('foo','bar');
$var = 'foo';
if(defined(constant($var)))
{
echo constant($var);
}
now you'd think that since the constant is defined it would output... nope...
define('foo','bar');
$var = 'foo';
if(!defined(constant($var)))
{
echo constant($var);
}
negating the defined() is the only way I can get it to work and YES it does output the contents of the constant... tell me that's not weird