php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34412 var_dump or is_int function report wrong datatype
Submitted: 2005-09-07 21:59 UTC Modified: 2005-09-07 22:18 UTC
Votes:1
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: bestmischmaker at web dot de Assigned:
Status: Not a bug Package: Variables related
PHP Version: 4.4.0 OS: Windows 2000
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bestmischmaker at web dot de
New email:
PHP Version: OS:

 

 [2005-09-07 21:59 UTC] 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)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-07 22:05 UTC] bestmischmaker at web dot de
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?
 [2005-09-07 22:18 UTC] tony2001@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Dec 27 02:01:29 2024 UTC