note 110080 added to control-structures.if
| From: | katisrdothu | Date: | Mon, 17 Sep 2012 11:39:03 +0000 |
| Subject: | note 110080 added to control-structures.if | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-190843@lists.php.net to get a copy of this message | ||
Regarding bimal at sanjaal dot com's question (07-Jul-2011 02:21):
1) '13_2' == NUMBER is true, because You compare a string to a number, so the string gets
converted to a number (see type conversion), resulting in (int) 13 == 13.
2) '13_2' == "{$number}" is false, because the double quotes convert the int 13
to a string ('13'), resulting in "13_2 " != '13'.
----
Server IP: 69.147.83.197
Probable Submitter: 91.120.68.249
----
Manual Page -- http://www.php.net/manual/en/control-structures.if.php
Edit -- https://master.php.net/note/edit/110080
Del: integrated -- https://master.php.net/note/delete/110080/integrated
Del: useless -- https://master.php.net/note/delete/110080/useless
Del: bad code -- https://master.php.net/note/delete/110080/bad+code
Del: spam -- https://master.php.net/note/delete/110080/spam
Del: non-english -- https://master.php.net/note/delete/110080/non-english
Del: in docs -- https://master.php.net/note/delete/110080/in+docs
Del: other reasons-- https://master.php.net/note/delete/110080
Reject -- https://master.php.net/note/reject/110080
Search -- https://master.php.net/manage/user-notes.php