note 27529 added to control-structures
| From: | php dot net at popquizhotshot dot com | Date: | Tue, 10 Dec 2002 00:10:42 +0000 |
| Subject: | note 27529 added to control-structures | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40634@lists.php.net to get a copy of this message | ||
I've noticed the following behaviour:
echo (1==1) ? "true" : "false";
and
echo "anything here at all" . (1==1) ? "true" : "false";
produce the exact same (unexpected to me) result:
true
"anything here at all" is dropped.
--
http://www.php.net/manual/en/control-structures.php
http://master.php.net/manage/user-notes.php?action=edit+27529
http://master.php.net/manage/user-notes.php?action=delete+27529
http://master.php.net/manage/user-notes.php?action=reject+27529