title: PHP7.1 json_encode() Float Issue
body: <p>This isn't a question as it is more of a be aware. I updated an application that uses <code>json_encode()</code> to PHP7.1.1 and I was seeing an issue with floats being changed to sometimes extend out 17 digits. According to documentation, PHP 7.1.x started to use <code>serialize_precision</code> instead of precision when encoding double values. I'm guessing this caused an example value of </p>
  
  <blockquote>
    <p>472.185 </p>
  </blockquote>
  
  <p>to become </p>
  
  <blockquote>
    <p>472.18500000000006 </p>
  </blockquote>
  
  <p>after that value went through <code>json_encode()</code>. Since my discovery, I have reverted back to PHP 7.0.16 and I no longer have the issue with <code>json_encode()</code>. I also tried to update to PHP 7.1.2 before reverting back to PHP 7.0.16.</p>
  
  <p>The reasoning behind this question does stem from <a href="https://stackoverflow.com/questions/3726721/php-floating-number-precision">PHP - Floating Number Precision</a>, however the end all reason for this is because of the change from precision to serialize_precision usage in <code>json_encode()</code>.</p>
  
  <p>If anyone does know of a solution to this problem, I'd be more than happy to listen in on the reasoning/fix.</p>
  
  <p>Excerpt from multidimensional array (before): </p>
  
  <pre><code>[staticYaxisInfo] =&gt; Array
                      (
                          [17] =&gt; stdClass Object
                              (
                                  [variable_id] =&gt; 17
                                  [static] =&gt; 1
                                  [min] =&gt; 0
                                  [max] =&gt; 472.185
                                  [locked_static] =&gt; 1
                              )
  
                      )
  </code></pre>
  
  <p>and after going through <code>json_encode()</code>...</p>
  
  <pre><code>"staticYaxisInfo":
              {
                  "17":
                  {
                      "variable_id": "17",
                      "static": "1",
                      "min": 0,
                      "max": 472.18500000000006,
                      "locked_static": "1"
                  }
              },
  </code></pre>