title: json_encode add numbers to result?
body: <p>I am having a very different question. For some reason, when the json_encode function receives a variable that has the value assigned by a multiplication, the <code>echo</code> result will be a different value than expected. Example:</p>
  
  <pre><code>&lt;?php
    $test = 1.1 * 122;
    echo json_encode(array("test" =&gt; $test)); // prints {"test":134.20000000000002}
    echo $test; // prints 134.2
  ?&gt;
  </code></pre>
  
  <p>For some reason, it doesn't work on every version of PHP, so I created a snippet on a tester that works:
  <a href="https://paiza.io/projects/ac19DwNBgn2oSqKa3fhW5A" rel="nofollow noreferrer">Online Tester</a></p>
  
  <p>Why does this happen?</p>