Re: Float comparison
| From: | Stanislav Malyshev | Date: | Sat, 03 May 2008 00:48:06 +0000 |
| Subject: | Re: Float comparison | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-37418@lists.php.net to get a copy of this message | ||
Hi!
Solvable in userland easily enough, but having a native money type, especially when dealing with inter-currency conversions, then accuracy is paramount.Adding native primitive type is expensive - there's a lot of places in engine and various functions that have to deal with primitive types, and they all need to be updated. However, adding object type can be OK, provided you are ready to forgo $a+$b for $a->add($b) etc. One might start with class library in PHP and go for extension later. I'm sure there are some code around doing this already :) -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com