This function is meant to be a drop-in replacement for those people who don’t have bcmath functionality in their PHP distribution. It probably has problems, and the best solution is to build yourself a version with bcmath support. Barring this, you can use this hack. (Jeff)
A regex for exponential numbers is [-+]?([0-9]*\.)?[0-9]+([eE][-+]?[0-9]+)?
Summary
| This function is meant to be a drop-in replacement for those people who don’t have bcmath functionality in their PHP distribution. |
| |
| Provides bcadd functionality (from bcmath extension) without having to load bcmath PHP extension. |