title: Is there an equivalent for toPrecision() in PHP?
body: <p>For example a number to 3 significant figures would be as follows</p>
  
  <pre><code>12345 =&gt; 12300
  0.12345 =&gt; 0.123
  0.012345 =&gt; 0.0123
  </code></pre>