The Authorize.Net Developer Blog

Posts from Authorize.Net employees, community members and experts about integrating with the Authorize.Net Payment Gateway: sample code, tutorials and problem-solving techniques just to name a few.

Precision Math with PHP

by Expert ‎12-07-2010 10:50 AM - edited ‎10-20-2011 10:01 AM (21,905 Views)

Handling dollar amounts isn't as simple as adding two numbers together. PHP, and other programming languages, have limitations to how precise they can be. This blog post will show you how to do precise money calculations using PHP's BC Math extension.