Originally posted by bunner bob
Or am I doing this wrong?
Only slightly:
defined('SHOW_SOMETHING');
It's a bit subtle, but you're wanting to see if a constant with the given name is defined, which is not the same thing as looking at its value. It's like the use-mention distinction in English.
On the other hand, you could leave it defined and use
define('SHOW_SOMETHING',true);
if(SHOW_SOMETHING)
{...}
And then when you don't want to SHOW_SOMETHING define it to false. That might make things more convenient in your code.