ID: 26959
User updated by: bugz at nagash dot org
Reported By: bugz at nagash dot org
Status: Verified
Bug Type: Math related
Operating System: Unix \ FreeBSD \ Windows
PHP Version: 4CVS, 5CVS
New Comment:
another example
$var = "0xABCDEF"; // I have this string
$var = (float)$var; // I want to have 'float'
echo $var; // different OS \ different results
Previous Comments:
------------------------------------------------------------------------
[2004-01-19 19:55:05] bugz at nagash dot org
I know it that if I write --- echo (float) 0xABCDEF;
but if I have string with hex value in it. and I want to get "int" or
"float" as I wrote in my example - I will get different result on
different OS
------------------------------------------------------------------------
[2004-01-19 13:17:36] [EMAIL PROTECTED]
This works everywhere like it should:
echo (float) 0xABCDEF;
------------------------------------------------------------------------
[2004-01-19 00:26:42] bugz at nagash dot org
Description:
------------
echo (float)("0xABCDEF");
on the Windows XP and FreeBSD 4.9 it shows: "0"
on the Unix systems (tested slackware 8 and RedHat) AND MacOS it shows:
"11259375"
Reproduce code:
---------------
echo (float)("0xABCDEF");
Expected result:
----------------
I expected to see "11259375"
Actual result:
--------------
on the different system I see "0" or "11259375"
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26959&edit=1