<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 23 May 2013 19:22:25 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP 10.0 Blog: Making $$$ with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/7543</guid>
      <link>http://www.phpdeveloper.org/news/7543</link>
      <description><![CDATA[<p>
In a <a href="http://php100.wordpress.com/2007/03/31/making-with-php/">brieft post</a> to the PHP 10.0 Blog today, <i>Stas</i> looks at a topic several PHPers out there have had to struggle with in their math-centric applications - how floats/doubles are handled in PHP.
</p>
<blockquote>
Just wanted to write about the topic discussed elsewhere - how one could do money calculations with PHP? PHP has no BCD type and no arbitrary precision float type either. And for money calculations is it important to have it very precise - accountants can not allow even single penny to slip by (remember the plot of the <a href="http://www.imdb.com/title/tt0151804/">Office Space movie</a>?)
</blockquote>
<p>
He basically says that the precision that PHP alone offers just isn't enough for some kinds of functionality. He also offers his own kind of solution proposal - switching the values back to (arbitrary-precision) integers and making all calculations in hundredth or thousandths of a cent.
</p>
<p>
Not that, according to <i>Ron</i> in the comments, there is in fact a <a href="http://ca.php.net/manual/en/ref.bc.php">BCMath extension</a> already built for PHP.
</p>]]></description>
      <pubDate>Mon, 02 Apr 2007 08:26:00 -0500</pubDate>
    </item>
  </channel>
</rss>
