Bug #12046 Updated: Strange handling of negative hexadecimal numbers
| From: | sander@php.net | Date: | Thu, 18 Oct 2001 19:42:22 +0000 |
| Subject: | Bug #12046 Updated: Strange handling of negative hexadecimal numbers | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-68267@lists.php.net to get a copy of this message | ||
ID: 12046
Updated by: sander
Reported By: jerome.delamarche@free.fr
Old Status: Open
Status: Closed
Bug Type: Scripting Engine problem
Operating System: Linux 2.4
PHP Version: 4.0.6
New Comment:
Works fine for me... unable to reproduce...
Previous Comments:
------------------------------------------------------------------------
[2001-07-15 12:56:42] zeev@php.net
For me, this example outputs the same (correct) results under both Windows and Linux:
591751049,2557891634
------------------------------------------------------------------------
[2001-07-11 08:04:49] jerome.delamarche@free.fr
When I initialize variables with hexadecimal integers, the positive ones are well handled but the
negative ones are considered as flots.
Try the followin code:
<?php
$n1 = 0x23456789; // positive
$n2 = 0x98765432; // negative
echo "$n1,$n2\n";
?>
it outputs:
591751049,1.1911111110821
Jerome
------------------------------------------------------------------------
Edit this bug report at http://bugs.php.net/?id=12046&edit=1