note 35973 added to language.operators
| From: | jokin at gmx dot de | Date: | Sun, 21 Sep 2003 09:38:14 +0000 |
| Subject: | note 35973 added to language.operators | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56842@lists.php.net to get a copy of this message | ||
echo "33"|"55"; // 77 -> both are casted to <b>string</b>
echo "33"|55; // 55 -> both are casted to int
echo 33|"55"; // 55 -> both are casted to int
echo 33|55; // 55 -> both are casted to int
echo (int)"33"|(int)"55"; // 55 -> both are casted to int
... if both sides are string-types, when a bitwise string-comparison will be done.
Jokin
----
Manual Page -- http://www.php.net/manual/en/language.operators.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35973
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35973&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35973&report=yes