note 105090 added to language.operators.comparison
| From: | jim at osu1 dot php dot net | Date: | Wed, 27 Jul 2011 10:24:34 +0000 |
| Subject: | note 105090 added to language.operators.comparison | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181929@lists.php.net to get a copy of this message | ||
In PHP, an empty array is equivalent to false. Not as mentioned in another comment.
>>> $arr = array();
>>> echo ($arr && true) ? 't' : 'f';
f
----
Server IP: 69.147.83.197
Probable Submitter: 195.166.29.2
----
Manual Page -- http://www.php.net/manual/en/language.operators.comparison.php
Edit -- https://master.php.net/note/edit/105090
Del: integrated -- https://master.php.net/note/delete/105090/integrated
Del: useless -- https://master.php.net/note/delete/105090/useless
Del: bad code -- https://master.php.net/note/delete/105090/bad+code
Del: spam -- https://master.php.net/note/delete/105090/spam
Del: non-english -- https://master.php.net/note/delete/105090/non-english
Del: in docs -- https://master.php.net/note/delete/105090/in+docs
Del: other reasons-- https://master.php.net/note/delete/105090
Reject -- https://master.php.net/note/reject/105090
Search -- https://master.php.net/manage/user-notes.php