note 14898 added to language.types.type-juggling.php

From: Date: Mon, 20 Aug 2001 11:59:47 +0000
Subject: note 14898 added to language.types.type-juggling.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16913@lists.php.net to get a copy of this message
carl.seleborg at ifrance.com on 26-Jul-2001 05:10 said: > It seems that sometimes, you need a little type juggling when doing bitwise > operations. Here's what happened to me (this was not the exact code, but the > values are the same) : > > $a = 7; > $b = 256; > > Later on, I did ($a & $b) with those exact values and got a result of 7, which > is mathematically wrong. Under PHP 4.05 this seems to work exactly as expected, no type casting appears to be required. http://www.php.net/manual/en/language.types.type-juggling.php

« previous php.notes (#16913) next »