PHP has nothing of the kind. but you could definitely hack something quickly (and possibly parsing to strip it later if you like). I would do it as such:
define('DEBUG', true); ... if (DEBUG): $debug->writeLine("stuff"); endif;
Of course, you have to write your own debugging module to handle all this. if you want to make life easier when parsing regular expressions, perhaps you could use the ternary operator:
$str = 'string'; DEBUG ? $debug->writeLine("stuff is ".$str) : null;
which will make deleting debug lines pretty trivial.
source share