ID:               22179
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
 Operating System: Debian GNU/Linux
 PHP Version:      4.2.3
 New Comment:

Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip


Previous Comments:
------------------------------------------------------------------------

[2003-02-11 18:59:49] [EMAIL PROTECTED]

<?
$b = "NAN";
$c = (float)$b;
$sum = 0;
$sum+= (int)$c;
echo "B is $b, C is $c, sum is $sum\n";
?>

i386 says sum is 0
alpha just does a floating point exception
sparc64 says sum is 2147483647
powerpc says sum is -2147483648

It should be 0, I guess.

If you prefer a one-liner:
<? echo (int)((float)"NAN")."\n"; ?>

Same result.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22179&edit=1

Reply via email to