thomasW wrote: > > There is already a pure PHP solution within ZF which can be used. > > Zend_Locale_Math is a bcmath clone which does automatically use BCMath and > when it's not available switch to pure PHP implementation. For examples on > usage look at Zend_Locale_Format or Zend_Measure_Abstract.
http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Locale/Math/PhpMath.php Interesting. Correct me if I'm wrong, but it appears to me that when bcmath is unavailable that library ceases to be a multiple precision integer arithmetic library (ie. BigInteger) and instead supports regular old 32-bit integers (or 64-bit for 64-bit machines)? If so, I'm not even sure it'd be accurate to say that it "falls back" on anything - if bcmath is unavailable its feature set becomes completely different. If you absolutely need 128-bit integers and bcmath is unavailable that library isn't going to be sufficient and if you have bcmath and can live with 32-bit integers that library is probably going to slow things down for you (bcadd(), I suspect, can't compare in speed to the + operator). If that library actually does support integers of any length regardless of whether or not bcmath is installed then shouldn't that library - and not Zend_Crypt_Math_BigInteger - be used by Zend_Crypt_DiffieHellman? -- View this message in context: http://www.nabble.com/pure-PHP-BigInteger-support-tp22068811p22211234.html Sent from the Zend Framework mailing list archive at Nabble.com.
