#34412 [Opn->Bgs]: var_dump or is_int function report wrong datatype

From: Date: Wed, 07 Sep 2005 20:18:04 +0000
Subject: #34412 [Opn->Bgs]: var_dump or is_int function report wrong datatype
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-84647@lists.php.net to get a copy of this message
ID: 34412 Updated by: tony2001@php.net Reported By: bestmischmaker at web dot de -Status: Open +Status: Bogus Bug Type: Variables related Operating System: Windows 2000 PHP Version: 4.4.0 New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [2005-09-07 22:05:47] 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 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

« previous php.bugs (#84647) next »