Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:78737 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 71439 invoked from network); 5 Nov 2014 17:22:03 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Nov 2014 17:22:03 -0000 Authentication-Results: pb1.pair.com header.from=jakub.php@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=jakub.php@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.213.171 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.213.171 mail-ig0-f171.google.com Received: from [209.85.213.171] ([209.85.213.171:56034] helo=mail-ig0-f171.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id A1/54-50436-9BC5A545 for ; Wed, 05 Nov 2014 12:22:01 -0500 Received: by mail-ig0-f171.google.com with SMTP id hl2so9051301igb.10 for ; Wed, 05 Nov 2014 09:21:58 -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=8zm1/v1yFPSaVtWJ9NLSwMoc2UurJcKIeXIXX53fg2s=; b=Bpxn0zWSshD8QpqUKYKJHpguIitXSr3pXslSIhLhPCxgnJhWLdGLbsXq2r+SL4Rl70 5DS4MBwrHZLPujLJ4O7QbUJgtPlLrksABiqEp8AFsqCgK5hV6JBkPxKB/Z2F7bGMBWe8 Fu2e4yUQFrxYaz5Hp1BOCTPA96dHHjcSX5tZpZGUwkiuXpOQFncHVYcbr5yNfKKe+KRq wkuEaJhtZEFfKqH+1uuWbkRliA/8IqutCMgddiGnm5mPEHmrda51LZy3F+0e+kvzVNGn m8X4SYJy9shcEt9LmBN3uNvYc4ot4cIjeXR+22g5LcN84+4waxf+FfsyxKxnzYjqr0Ty rGPw== MIME-Version: 1.0 X-Received: by 10.107.138.26 with SMTP id m26mr17826478iod.64.1415208118321; Wed, 05 Nov 2014 09:21:58 -0800 (PST) Sender: jakub.php@gmail.com Received: by 10.107.11.217 with HTTP; Wed, 5 Nov 2014 09:21:58 -0800 (PST) In-Reply-To: References: Date: Wed, 5 Nov 2014 17:21:58 +0000 X-Google-Sender-Auth: AYkWrBrDJAMK3WzFwFtQ9b8bf1Q Message-ID: To: Chris Wright Cc: Ferenc Kovacs , Juan Basso , PHP Internals Content-Type: multipart/alternative; boundary=001a113ff6aa2d08fd05071fd17a Subject: Re: [PHP-DEV] Add a new flag for json_encode From: bukka@php.net (Jakub Zelenka) --001a113ff6aa2d08fd05071fd17a Content-Type: text/plain; charset=UTF-8 On Wed, Nov 5, 2014 at 4:52 PM, Chris Wright wrote: > > I'm sorry, but I don't understand why it would need to be deprecated. For > me "making it the default behaviour" would mean "changing the default value > of the $flags argument to JSON_PRESERVE_FACTIONAL_PART". The flag would > still function in exactly the same way - old code which pass flags > explicitly would continue to work in the same way, and any code which did > not want the new behaviour would only have to pass 0 to flags to get that > behaviour back. > > Then passing any flag will automatically disable it unless all current constants will be ORed with that value. It means if you set default as (options = JSON_PRESERVE_FACTIONAL_PART in zif_json_encode) and you pass just PHP_JSON_UNESCAPED_UNICODE then fractional part will be disabled (unless the constants are ORed). It's not really default like other defaults in json_encode because it's changed by any flag. That being said if it's just me who doesn't like it and there are no other objection, I don't mind if it gets in. Let's just wait few days if there isn't anyone who also thinks that adding such feature to micro release is not the best idea... Cheers Jakub --001a113ff6aa2d08fd05071fd17a--