#34412 [Opn]: var_dump or is_int function report wrong datatype
| From: | bestmischmaker at web dot de | Date: | Wed, 07 Sep 2005 20:05:49 +0000 |
| Subject: | #34412 [Opn]: var_dump or is_int function report wrong datatype | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-84645@lists.php.net to get a copy of this message | ||
ID: 34412
User updated by: bestmischmaker at web dot de
Reported By: bestmischmaker at web dot de
Status: Open
Bug Type: Variables related
Operating System: Windows 2000
PHP Version: 4.4.0
New Comment:
Sorry
but now I think to know why var_dump will say is a float number
The while func run to 2147483648 and that isn't an integer anymore and
I decrease the var up to 2147483647 but don't change back the datatype
;)
I'm so sorry...
@admin please delete this report....
had I make a var_dump((int)--$i); I had said my error.....
regard
J°!(\)tý
Previous Comments:
------------------------------------------------------------------------
[2005-09-07 21:59:55] bestmischmaker at web dot de
Description:
------------
Hy...
if you run these few lines of code the is_int function say:
OK is an Interger
but var dump say it's an floatingpoint number....
Now is my question who of both says the right ???
regard
J°!(\)tý
Reproduce code:
---------------
<?php
$i = 2147000000;
set_time_limit(0);
while(is_int($i))
{
$i++;
}
var_dump(--$i);
var_dump(2);
?>
Expected result:
----------------
float(2147483647) int(2)
Actual result:
--------------
int(2147483647) int(2)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34412&edit=1