I had some very similar, very troubling PHP code.<p><pre><code>  var_export($var) &#x2F;&#x2F; 18
  json_encode($var) &#x2F;&#x2F; 18
  serialize($var) &#x2F;&#x2F; 18i:18;
  var_export($var == 18) &#x2F;&#x2F; false
  var_export(floor($var)) &#x2F;&#x2F; 17
</code></pre>
Ends up PHP floats have a configurable precision and an actual physical 32&#x2F;62 bit (depending on the system) in memory value who are separate and some operations use one and some the other.  It was particularly troubling because I&#x27;d hope to be able to serialize and unserialize numbers losslessly but that was not the case.