ID:               24381
 Updated by:       [EMAIL PROTECTED]
 Reported By:      yipkeikwok at yahoo dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Math related
 Operating System: Windows 2000, Redhat Linux 9
 PHP Version:      4.3.2
 New Comment:

Your "expected result" is based on an incorrect assumption.

The lower bound for type "integer" on a 32bit platform is in fact
-2147483648.


Previous Comments:
------------------------------------------------------------------------

[2003-06-28 18:51:35] yipkeikwok at yahoo dot com

Description:
------------
The function var_dump() returns different data type for -2147483647 and
-2147483647-1

--Yipkei Kwok

Reproduce code:
---------------
<?php
$int1 = -2147483648;
$int2 = -2147483647-1;
var_dump($int1);
var_dump($int2);
?>

Expected result:
----------------
float(-2147483648)
float(-2147483648)

The lower bound for data type integer is -2147483647. So, -2147483648
(-2147483647-1) should be regarded as float.

Actual result:
--------------
float(-2147483648)
int(-2147483648)

However, -2147483648 (-2147483647-1) is regarded as int.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=24381&edit=1

Reply via email to