Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37418 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9960 invoked from network); 3 May 2008 00:58:44 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 May 2008 00:58:44 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:33272] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/1A-55202-2C8BB184 for ; Fri, 02 May 2008 20:58:44 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Sat, 3 May 2008 03:59:37 +0300 Received: from [192.168.16.217] ([192.168.16.217]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 2 May 2008 17:49:03 -0700 Message-ID: <481BB646.4060407@zend.com> Date: Fri, 02 May 2008 17:48:06 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: internals@lists.php.net References: <001401c8ac74$dda6d060$98f47120$@com> <1209749793.1075.54.camel@inspiron.local> <481B5F45.4030106@gmail.com> <481B6068.9060402@lerdorf.com> <1209758625.1075.87.camel@inspiron.local> <20080502232537.GB6064@mint.phcomp.co.uk> <10845a340805021659p34b5b403r9c2f00b96eb83803@mail.gmail.com> <481BAC65.9030407@zend.com> <10845a340805021714h45c316a7qc99c05e9e52ae5e4@mail.gmail.com> In-Reply-To: <10845a340805021714h45c316a7qc99c05e9e52ae5e4@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 May 2008 00:49:03.0991 (UTC) FILETIME=[7C076070:01C8ACB7] Subject: Re: [PHP-DEV] Float comparison From: stas@zend.com (Stanislav Malyshev) 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