Can someone explain this?
| From: | René Fournier | Date: | Tue, 08 Jun 2004 16:52:41 +0000 |
| Subject: | Can someone explain this? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-187895@lists.php.net to get a copy of this message | ||
$dec = -333371788;
echo $dec."\n";
$hex = dechex($dec)."\n";
$dec2 = hexdec($hex)."\n";
echo $dec2."\n";
-= PRODUCES: =-
-333371788
3961595508
Is this something about signed versus unsigned integers? What I really would like to do is convert that negative number (-333371788), which I suppose is unsigned to a signed integer (3961595508) without having to convert it to hex, then back to decimal.
....Rene