note 25220 added to language.expressions

From: Date: Sun, 15 Sep 2002 06:19:39 +0000
Subject: note 25220 added to language.expressions
Groups: php.notes 
Request: Send a blank email to php-notes+get-36689@lists.php.net to get a copy of this message
Why doesn't this work? <?php $debug = true; function p($s) { if ($debug) echo $s; } p("print me"); ?> Yet, if I replace the if statement in the function to read if (true) echo $s; then the page works as it should. What's going on here? -- http://www.php.net/manual/en/language.expressions.php http://master.php.net/manage/user-notes.php?action=edit+25220 http://master.php.net/manage/user-notes.php?action=delete+25220 http://master.php.net/manage/user-notes.php?action=reject+25220

« previous php.notes (#36689) next »