title: Floating point test assertion - why do these "identical" arrays fail?
body: <p>I'm using <strong>assertSame()</strong> in PHPUnit to compare a database result with expected values. The results are floating point numbers.</p>
  
  <p>PHPUnit returns this message (but I can't spot any differences):</p>
  
  <pre><code>Failed asserting that Array (
      '1_1' =&gt; 11.111111111111
      '1_2' =&gt; 33.333333333333
      '1_3' =&gt; 55.555555555556
      '1_4' =&gt; 0.0
      '1_5' =&gt; null
      '1_total' =&gt; 100.0
  ) is identical to Array (
      '1_1' =&gt; 11.111111111111
      '1_2' =&gt; 33.333333333333
      '1_3' =&gt; 55.555555555556
      '1_4' =&gt; 0.0
      '1_5' =&gt; null
      '1_total' =&gt; 100.0
  )
  </code></pre>
  
  <p>Why is this failing and what is the correct way to compare an arrays of floating point values?</p>