Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78728 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55910 invoked from network); 5 Nov 2014 16:27:12 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2014 16:27:12 -0000 Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.223.173 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.223.173 mail-ie0-f173.google.com Received: from [209.85.223.173] ([209.85.223.173:51032] helo=mail-ie0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/01-50436-FDF4A545 for ; Wed, 05 Nov 2014 11:27:12 -0500 Received: by mail-ie0-f173.google.com with SMTP id tr6so1037344ieb.4 for ; Wed, 05 Nov 2014 08:27:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=A6j0oZx9lTSqCFkL3mcTjp4NMhzEI4VQHbSkUuVG2fk=; b=UbF7dDnT8clUbIUsxlK2Tz43MAP+inSf3aZtLkMXzWbtlGx22f8Wi+ysoJ0Uc4abhy 4SleqblmSivSB0hTiCN+MWIchlQ1gJQTWQVbNXJwo3vmvYSXrFIZXRoFLCpqrB1kD4mN qDLXVt0PtgS8GGXA5Ft2xql9+ONabgnyWu+h8pAFGW9/gQza1CMpIHWgg3TCDsvqCYo0 oCnCx2RG56TkZ+3sCEtX3bXbUgOVXHl6PFqCgtwBT53Jbco3dES7iziwLdXpmRaORfQA 5rd0xGWb1vwssK0BZNp8vQjIwYS8V2l/uT/f8WU9aDlsouqYy9nWCAgI3RloB5AJIGR7 WnLw== MIME-Version: 1.0 X-Received: by 10.50.122.100 with SMTP id lr4mr33239557igb.9.1415204828965; Wed, 05 Nov 2014 08:27:08 -0800 (PST) Sender: jakub.php@gmail.com Received: by 10.107.11.217 with HTTP; Wed, 5 Nov 2014 08:27:08 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Nov 2014 16:27:08 +0000 X-Google-Sender-Auth: wf6gLvIGyNDCbqpmu20f2L2jbkQ Message-ID: To: Chris Wright Cc: Ferenc Kovacs , Juan Basso , PHP Internals Content-Type: multipart/alternative; boundary=001a11c1f7a41d72ab05071f0d6d Subject: Re: [PHP-DEV] Add a new flag for json_encode From: bukka@php.net (Jakub Zelenka) --001a11c1f7a41d72ab05071f0d6d Content-Type: text/plain; charset=UTF-8 On Wed, Nov 5, 2014 at 2:33 PM, Chris Wright wrote: > > I'm afraid I have to disagree here, I don't like the idea of changing this > behaviour without making it controllable, and your logic is also slightly > flawed - it's not that you'd have to do an & ~ to disable, it's that it > wouldn't be enabled unless you added it to your flags argument. Passing a > value of JSON_FORCE_OBJECT wouldn't be handled as JSON_FORCE_OBJECT | > JSON_PRESERVE_FRACTIONAL_PART, you'd just need to explicitly pass 0 to the > flags argument to disable it. > That was just only possible use case for JSON_PRESERVE_FRACTIONAL_PART if it was made default in the PHP 7 but when I think about it's a bit stupid. It could theoretically work if all constants were ORed with that value but that's nonsens. Jakub --001a11c1f7a41d72ab05071f0d6d--