Can you undefine or change a constant in PHP?
I know this is late to the game... but here is one thing that might help some people...
In my "Application.php" file (where I define all my constants and include in all my scripts) I do something like this:
if( !defined( "LOGGER_ENABLED" )){
define( "LOGGER_ENABLED", true );
}
So normally, every script is going to get logging enabled... but if in ONE particular script I don't want this behavior I can simply do this BEFORE I include my Application.php:
define( "LOGGER_ENABLED", false );