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:
# I was just wondering if there was anything like the #ifdef and #endif in C
# that you could use with PHP for debugging? If not, what would you suggest?
# I have been adding statements for debugging and then taking them out but
# it is not very efficient. It would be good to have a way to turn them on
# or off using one statement.
<?
DEBUG=1; // 1=debugging on, 0=debugging off

if ($DEBUG) {
        <some statements in debugmode>
} else {
        <some statements in non-debugmode>
}
?>

Depending on whethet DEBUG equals 1 or 0, some of the statements will be
executed and others won't.
Is this what you're looking for?

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