rfc:php_ini_bcmath_default

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
rfc:php_ini_bcmath_default [2012/03/06 21:01] – created michaelmorrisrfc:php_ini_bcmath_default [2017/09/22 13:28] (current) – external edit 127.0.0.1
Line 2: Line 2:
   * Version: 0.1   * Version: 0.1
   * Date: 2012-03-06   * Date: 2012-03-06
-  * Author: Michael Morris <dmgx.michael@gmail.com+  * Author: Michael Morris <dmgx.michael@gmail.com>
   * Status: Under Discussion   * Status: Under Discussion
   * First Published at: https://wiki.php.net/rfc/php_ini_bcmath_default   * First Published at: https://wiki.php.net/rfc/php_ini_bcmath_default
Line 23: Line 23:
  
 Assuming a scale of 2.  The setting can be activated at runtime, by htaccess or in the core php.ini file. Assuming a scale of 2.  The setting can be activated at runtime, by htaccess or in the core php.ini file.
 +
 +Note that this proposal is just for the math operators, not for all the math functions.  Even with this setting on, ++ and -- would increment/decrement by 1.
 +
 +
  
 ==== Potential Problems ==== ==== Potential Problems ====
  
 This will be a performance hit when enabled.  Other than that though I can't think of any major problems. This will be a performance hit when enabled.  Other than that though I can't think of any major problems.
 +
 +==== Performance ====
 +
 +Portable applications would have to perform QA stress tests under both settings to be sure the (probably major) performance issues aren't going to kill it.
 +
 +Or it needs to be easily turned "off" from within an app and in .htaccess
 +
 +Even then, somebody who turns this "on" and suddenly their entire website goes down because of the performance penalty is not going to be happy...
 +
 +Can you write some sample code to measure the performance difference between normal PHP and re-writing the sample to use BCMath?
  
 ===== Changelog ===== ===== Changelog =====
  
 2012-03-06 Created. 2012-03-06 Created.
rfc/php_ini_bcmath_default.1331067667.txt.gz · Last modified: 2017/09/22 13:28 (external edit)