PHP 4.0 Bug #5382: & does not work with unsigned int32
| From: | casper at steinhauer dot dk | Date: | Wed, 05 Jul 2000 15:15:15 +0000 |
| Subject: | PHP 4.0 Bug #5382: & does not work with unsigned int32 | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-23473@lists.php.net to get a copy of this message | ||
From: casper@steinhauer.dk
Operating system: Linux version 2.4.0-test2
PHP version: 4.0 Release Candidate 1
PHP Bug Type: Scripting Engine problem
Bug description: & does not work with unsigned int32
#!/usr/local/bin/php -q
<?php
echo "here the & goes good\n";
$a=884330816;
print ($a);
print ("\n");
print (($a-256*256*256*128) & 255);
print ("\n");
print (($a) & 255);
print ("\n");
echo "here it goes bad\n";
$a=4076863680;
print ($a);
print ("\n");
print (($a-256*256*256*128) & 255);
print ("\n");
print (($a) & 255); # $a is an unsigned int32 when it is printed!
print ("\n");
?>
It works in PHP3