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.




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to