| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2002-05-17 02:16 UTC] derick@php.net
  [2002-05-17 02:36 UTC] david at acz dot org
  [2002-05-17 02:41 UTC] derick@php.net
  [2002-05-17 03:22 UTC] corey at lik-sang dot com
  [2002-05-17 03:25 UTC] corey at acz dot org
  [2002-05-17 04:11 UTC] corey at lik-sang dot com
  [2002-05-17 09:20 UTC] rasmus@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 04:00:01 2025 UTC | 
This problem also occurs on PHP 4.1.2. The following code fragment produces very odd results: <? $a = array(41.96, 20.97, 20.99); $t = 0; for($i = 1; $i < count($a); $i++) $t += abs($a[$i]); echo "$t != $a[0]\n"; var_dump($t != $a[0]); echo "t = "; var_dump($t); echo "a[0] = "; var_dump($a[0]); ?> The results are shown below: 41.96 != 41.96 bool(true) t = float(41.96) a[0] = float(41.96) Both variables appear to be the same type, and look the same, yet compare incorrectly with both typed and untyped comparisons.