rfc:php_ini_bcmath_default

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
rfc:php_ini_bcmath_default [2012/03/06 21:05] – [Request for Comments: PHP.INI Setting to Force All Math Operations Through BCMath Library] michaelmorrisrfc:php_ini_bcmath_default [2017/09/22 13:28] (current) – external edit 127.0.0.1
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.1331067900.txt.gz · Last modified: 2017/09/22 13:28 (external edit)