Re: Debug code

From: Date: Tue, 20 Jan 2004 14:36:15 +0000
Subject: Re: Debug code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-175140@lists.php.net to get a copy of this message
You can write a sed or awk or perl script that will automatically remove your debug statements as long as they follow some form of convention. You could also write a form of preprocessor in this way that would also include files, perform substitutions, etc if you had the time. I have a sed script that automatically converts smarty tags from {* to <!--{* for easier editing by end-user's and one that converts them back for easier editing by me :-). Jason Jay Blanchard wrote:
[snip] I have a large PHP application that has a ton of statements like the first email for catching problems. I would like to 'automatically' remove them before I ship the code to eliminate the extra size. I can do it in C, C++, VB but I don't know if it can be done in PHP. [/snip] Whoever created the code added the debug statements. PHP is interpreted by the Zend/PHP engine and therefore does not have a preprocessor. If you wish to remove said code you must do it by hand.


« previous php.general (#175140) next »