note 76243 added to function.print

From: Date: Sat, 07 Jul 2007 03:48:12 +0000
Subject: note 76243 added to function.print
Groups: php.notes 
Request: Send a blank email to php-notes+get-128276@lists.php.net to get a copy of this message
This is a simple function for printing debug comments that I didn't think of for a long time. Maybe it'll serve you good too. <?php // by http://www.linksback.org function printd($str) { if ($debug) { echo $str; } } // ... if ($valueCalculatedEarlierInTheScript == 3) { doSomethingWithNoOutput(); printd("doSomethingWithNoOutput() has executed."); } ?> It's mostly just to make sure everything is running without having to go through everything and put in echo "Step #whatever has executed" whenever something mysterious isn't working. ---- Server IP: 208.69.120.35 Probable Submitter: 68.96.96.27 ---- Manual Page -- http://www.php.net/manual/en/function.print.php Edit -- https://master.php.net/note/edit/76243 Del: integrated -- https://master.php.net/note/delete/76243/integrated Del: useless -- https://master.php.net/note/delete/76243/useless Del: bad code -- https://master.php.net/note/delete/76243/bad+code Del: spam -- https://master.php.net/note/delete/76243/spam Del: non-english -- https://master.php.net/note/delete/76243/non-english Del: in docs -- https://master.php.net/note/delete/76243/in+docs Del: other reasons-- https://master.php.net/note/delete/76243 Reject -- https://master.php.net/note/reject/76243 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#128276) next »