Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:80170 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 99034 invoked from network); 5 Jan 2015 09:31:43 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2015 09:31:43 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.176 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 74.125.82.176 mail-we0-f176.google.com Received: from [74.125.82.176] ([74.125.82.176:63695] helo=mail-we0-f176.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/72-09311-CF95AA45 for ; Mon, 05 Jan 2015 04:31:41 -0500 Received: by mail-we0-f176.google.com with SMTP id w61so7492303wes.7 for ; Mon, 05 Jan 2015 01:31:37 -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=02E9BNsv/CqRWGiyBjdwEujyZ9lMdI2OvXPXKWauyi8=; b=fFItul4aw2pV0DRap8nk9gklKNKNazjHyqKBv+t2aSCFkZTmvPUT4k7tg+t81TApjA p6+iqtCuYMBT7jZIYoKOWfI2wE5nfofEowFymLjfWI6CYmEL0z6LeKuSiDALNrwTFmSK 3sUTxxBhhak5rEH/maAW+PXJtwdfrfKK0Q5QHiWLzkT71TWnRttF3V3TCZcmkJXLeMSr Zgg6UTni3bZWHr05wwxWekS7GOJ3jsmR3bq/ASVatd0929wsU6e5TBtg8yR08+TULKSS 6MdqpzR/BlzX/5zXojOoVDRuQDB8sec5Ep7epX6q03r2l9EW9jcL6rdPHTUpYNtreSAF C3WQ== MIME-Version: 1.0 X-Received: by 10.194.90.10 with SMTP id bs10mr179873519wjb.43.1420450296776; Mon, 05 Jan 2015 01:31:36 -0800 (PST) Received: by 10.180.88.33 with HTTP; Mon, 5 Jan 2015 01:31:36 -0800 (PST) In-Reply-To: References: <162491F3-F774-415C-A6B4-EB66D092C1A3@ajf.me> Date: Mon, 5 Jan 2015 10:31:36 +0100 Message-ID: To: Juan Basso Cc: PHP Internals Content-Type: multipart/alternative; boundary=047d7bd9058e5c4dc2050be45b3f Subject: Re: [PHP-DEV] [RFC] Preserve Fractional Part in JSON encode From: tyra3l@gmail.com (Ferenc Kovacs) --047d7bd9058e5c4dc2050be45b3f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 5, 2015 at 5:18 AM, Juan Basso wrote: > Hi, > > Everyone has any concern on the constant name as Andrea mentioned? Should > we keep or rename it? If this name is fine and there is no other concerns > probably in 3 days (when completes 2 weeks) this RFC can be moved to > voting, right? > > > Thanks, > Juan Basso > I prefer the originally proposed constant name (JSON_PRESERVE_FRACTIONAL_PART) over JSON_FLOAT_ADD_POINT_ZERO. I've did a quick check and we have a constant called FILTER_FLAG_ALLOW_FRACTION so maybe JSON_PRESERVE_FRACTION would be a bit simpler and consistent. But that would still imply that without this option we truncate (non-zero) fractional parts, so maybe something like JSON_PRESERVE_ZERO_FRACTION. I think PRESERVE is better than ADD because we aren't really adding something but making sure that it won't be lost through the json_encode. --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --047d7bd9058e5c4dc2050be45b3f--