Q:

How to disable code conditionally

I'm a C/C++ Programmer new to PHP. 
In C/C++, I often add code to my project (e.g. debugging output) that will be active only if a specific macro is defined. So, I'm able to "switch on / switch off" some code by defining / removing the macro definition inside a central header file.
E.g. in the header file:
#define ENABLE_DEBUG_OUTPUT

and anywhere in the code where it is useful:
#ifdef ENABLE_DEBUG_OUTPUT
    print_debug_output ( ... );
#endif

So to disable the print-debug_output calls (or anything else), I only need to comment out the #define inside the header file.
Is there some equivalent in PHP? 
At first, I want to use FirePHP for debugging output on my test system, but disable it as soon as I put the code on the server. What's the best way to do this?

A:

You can use native PHP function http://www.php.net/define
//Place the below line to your first loading file or any preferred place;
define("ENABLE_DEBUG_OUTPUT", true); //Or false;

//Then use it anywhere:
if( ENABLE_DEBUG_OUTPUT )
    print_r($my_debug_var);

