note 27205 added to language.types.type-juggling
| From: | yury at krasu dot ru | Date: | Wed, 27 Nov 2002 07:24:02 +0000 |
| Subject: | note 27205 added to language.types.type-juggling | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40023@lists.php.net to get a copy of this message | ||
incremental operator ("++") doesn't make type conversion from boolean to int, and if
an variable is boolean and equals TRUE than after ++ operation it remains as TRUE, so:
$a = TRUE;
echo ($a++).$a; // prints "11"
--
http://www.php.net/manual/en/language.types.type-juggling.php
http://master.php.net/manage/user-notes.php?action=edit+27205
http://master.php.net/manage/user-notes.php?action=delete+27205
http://master.php.net/manage/user-notes.php?action=reject+27205