Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79950 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51565 invoked from network); 25 Dec 2014 23:17:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Dec 2014 23:17:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=jrbasso@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jrbasso@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.192.48 as permitted sender) X-PHP-List-Original-Sender: jrbasso@gmail.com X-Host-Fingerprint: 209.85.192.48 mail-qg0-f48.google.com Received: from [209.85.192.48] ([209.85.192.48:47043] helo=mail-qg0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A9/53-31774-E1B9C945 for ; Thu, 25 Dec 2014 18:17:50 -0500 Received: by mail-qg0-f48.google.com with SMTP id f51so6800054qge.21 for ; Thu, 25 Dec 2014 15:17:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=63h2oW/FPNXdZ6izg9j9v5iMHmfFQymTccVOgE61EOE=; b=cNv2uYf+XlmEwoXUOk5OeF94HsF5AnJASR/X++2iCsb8iGBAjfKFjGqfomuagjlp+m 0n/JXuZeckYX0k12aIvzLlg/ouW6BRESLteS6+e4buXlqOa90RaKYk8zpfGUmPLbkziw x5Y5js42Ia6tNeXxphPxLdnxokeQ4J03+XnehytK9tK9/GKwMGGH7Yi82UNSO7LbuOYj 5jB+uzixRD3Ox2Ql4jNdK8Usl6bGMpDHbpM9p3cMGX7atwVKLYCHpS6fnN/J+94+8hLt tozzrM9NymviBd9F82qlFqmBldZ0FEpGwxuE8zuYjgB8xYc484z0Uha/eccX/6BtX0G8 tUGw== MIME-Version: 1.0 X-Received: by 10.224.63.198 with SMTP id c6mr23963856qai.41.1419549467350; Thu, 25 Dec 2014 15:17:47 -0800 (PST) Received: by 10.140.17.80 with HTTP; Thu, 25 Dec 2014 15:17:47 -0800 (PST) In-Reply-To: <162491F3-F774-415C-A6B4-EB66D092C1A3@ajf.me> References: <162491F3-F774-415C-A6B4-EB66D092C1A3@ajf.me> Date: Thu, 25 Dec 2014 21:17:47 -0200 Message-ID: To: Andrea Faulds Cc: PHP Internals Content-Type: multipart/alternative; boundary=001a11c218fcbe20a5050b129dcb Subject: Re: [PHP-DEV] [RFC] Preserve Fractional Part in JSON encode From: jrbasso@gmail.com (Juan Basso) --001a11c218fcbe20a5050b129dcb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Andrea, I am not a specialist in float numbers, but I think integral float numbers have a fractional part with value 0. JSON_FLOAT_ADD_POINT_ZERO can be confuse for regular floats with non-zero as fractional part. Seems you are going to add a point zero in a regular float with point something. Anyway, I am open to rename the constant to make it clear for everyone. I just can't find a better name than that. By the way, this name was proposed by Kevin Israel (plstand) on the PR. On Thu, Dec 25, 2014 at 9:01 PM, Andrea Faulds wrote: > > > On 25 Dec 2014, at 19:32, Juan Basso wrote: > > > > The RFC can be found here: > > https://wiki.php.net/rfc/json_preserve_fractional_part > > Hey Juan, > > A further thought: is =E2=80=9CPreserve Fractional Part=E2=80=9D the best= name? Integral > floats like float(12) don=E2=80=99t have any fractional part, and besides= , the name > doesn=E2=80=99t tell you what it does IMO. Perhaps something like > JSON_FLOAT_ADD_POINT_ZERO? It=E2=80=99s more literal and, I think, more o= bvious. > > Thanks. > > -- > Andrea Faulds > http://ajf.me/ > > > > > --001a11c218fcbe20a5050b129dcb--