Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15124 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 17713 invoked by uid 1010); 20 Feb 2005 15:46:04 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 17696 invoked from network); 20 Feb 2005 15:46:04 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2005 15:46:04 -0000 X-Host-Fingerprint: 64.233.184.204 wproxy.gmail.com Linux 2.4/2.6 Received: from ([64.233.184.204:41088] helo=wproxy.gmail.com) by pb1.pair.com (ecelerity 1.2 (r4437)) with SMTP id FC/A9-12222-CB0B8124 for ; Sun, 20 Feb 2005 10:46:04 -0500 Received: by wproxy.gmail.com with SMTP id 63so296525wri for ; Sun, 20 Feb 2005 07:46:02 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=qYUXz5VdOsayk1SrLm0qZhsXwLw4NDKbqmh4XiszOI89tnQ7bitSQ9dR9rY0SnHTC8rMAgrbj/4glBEgTT9k5qvdYqe7PBWPbD0rQe5wWd/h0eIpXHbPWtXgjZR6ysLnQDp7N3TXvy6EETW2ctfLEsYChZiB3f56Mr9rLwSl7uc= Received: by 10.54.17.23 with SMTP id 23mr180063wrq; Sun, 20 Feb 2005 07:46:01 -0800 (PST) Received: by 10.54.59.22 with HTTP; Sun, 20 Feb 2005 07:46:01 -0800 (PST) Message-ID: <4e89b42605022007465f211680@mail.gmail.com> Date: Sun, 20 Feb 2005 10:46:01 -0500 Reply-To: Wez Furlong To: Timm Friebe Cc: internals@lists.php.net In-Reply-To: <1108913863.316.71.camel@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1108836903.316.40.camel@localhost> <42185C0B.3000308@php.net> <1108899361.316.63.camel@localhost> <4e89b42605022006445681add4@mail.gmail.com> <1108913863.316.71.camel@localhost> Subject: Re: [PHP-DEV] Re: PDO types From: kingwez@gmail.com (Wez Furlong) > > On Sun, 20 Feb 2005 12:36:01 +0100, Timm Friebe wrote: > > > * If the number does not fit, I will try to convert it into a double > > > (PHP datatype float). This is the case for e.g. numeric(10) - values > > > might not fit. This is the same what PHP does when adding 1 to > > > LONG_MAX, for instance. If - in the procedure of doing so, strtod() > > > gives an ERANGE or if the length overflows EG(precision), I will > > > return a string. > > > > This is exactly what I wanted to avoid. > > Why is that so? I think this a good idea - it saves memory in the usual > case (most numbers will probably fit into a long). The problem is for the case where the mapping is not 1:1; you end up changing a 100% precise value into a floating point "guess". String has a higher fidelity than a float, and PDO prefers hi-fi any day. > > Please don't make this change. > > How could I? I only have CVS karma for ext/sybase_ct, not for anything > else, not Zend, not PDO:) ack :) Well, I meant really that you shouldn't spend time on it :) --Wez.