ID: 41591 Updated by: [EMAIL PROTECTED] Reported By: augustowebd at gmail dot com -Status: Open +Status: Bogus -Bug Type: SPL related +Bug Type: Unknown/Other Function Operating System: Windows 2000 PHP Version: 5CVS-2007-06-04 (CVS) New Comment:
Yes, float minus integer is still float and this is expected behavior. Previous Comments: ------------------------------------------------------------------------ [2007-06-04 19:44:55] augustowebd at gmail dot com Description: ------------ an improper exchange of types is cause enters the one limits int for one float. exactly being the same I number, when executed with an expression the type it is raised for float and when expressed with a static number the number it remains a whole number. Reproduce code: --------------- var_dump( 2147483647 ); // says: int(2147483647) var_dump( pow(2,31 ) - 1 ); // says: float(2147483647) Expected result: ---------------- var_dump( 2147483647 ); // int(2147483647) var_dump( pow(2,31 ) - 1 ); // int(2147483647) Actual result: -------------- var_dump( 2147483647 ); // int(2147483647) var_dump( pow(2,31 ) - 1 ); // int(2147483647) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41591&edit=1
