Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199807

Re: [PHP3] #ifdef and #endif From: Martin Schapendonk (M.Schapendonk <email protected>)
Date: 07/22/98

On Wed, 22 Jul 1998, Walter Dougoveto wrote:
# Yes that is what I was looking for, but I was hoping there was something I
# could use which would be completely ignored if it was not defined. That
# way when it is turned off it would not slow down the code.

Just a small adjustment:

<?
DEBUG=1; // 1=debug, 0=nodebug

if (!$DEBUG) {
        <some statements>
}
?>

This way the <some statements> will not be executed in debug-mode and
thus will not slow down the code (except for checking the if-statement).

Of course you're free to add more "if (!$DEBUG) {}"-constructions, as
much as you like.

Martin

-- 
  Martin Schapendonk, M.Schapendonk <email protected>, Phone: +31 (0)13-4674268
  Student Information Management and Technology at Tilburg University
  Homepage: http://stuwww.kub.nl/people/martin/
  WEBMaster of the Students-WWW-server stuwww.kub.nl

-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.php.net/mailsearch.php3