Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100126 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 40431 invoked from network); 30 Jul 2017 19:01:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 30 Jul 2017 19:01:29 -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.161.174 as permitted sender) X-PHP-List-Original-Sender: jakub.php@gmail.com X-Host-Fingerprint: 209.85.161.174 mail-yw0-f174.google.com Received: from [209.85.161.174] ([209.85.161.174:34503] helo=mail-yw0-f174.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E8/86-07025-80D2E795 for ; Sun, 30 Jul 2017 15:01:28 -0400 Received: by mail-yw0-f174.google.com with SMTP id s143so13797883ywg.1 for ; Sun, 30 Jul 2017 12:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MteVnw3BTjFEn+oPAW8qxDkpcVpVYO/FX3FkOdPSzr8=; b=bSOPtYkKgi15juYaYoeZp3E6sI57hmQex9O2kxosQFaSDrKGi8DUcGrg4IFJmMfMRA Ceqwkfbp5/Eq3MnZ8QxA/ZXdUqa0U/ZB+P6jcy2nC2p7YWHBkSoq4DichBp0hbMBsmQf WjaO+KXtCn1RZ7FSWHT1IIV6qNXfcsG6gvQe78nHjPm7v5Bv1zmAxJQIMwYDVHCvtS3V XKBGe/HyokwbCjDd/ENa7JElD5clgoes8lUMXX6/i+MKjjBSpzud755jFysBcHkZ7l6e Pz9vAk4xdNB5S3ReUkB8dSnWEoFvAn098BHJ00309YCupSinlfiq+U90gM0SvL+4xE8b oHIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=MteVnw3BTjFEn+oPAW8qxDkpcVpVYO/FX3FkOdPSzr8=; b=DzQZpYsY0q94dhDnVrEClmoRSS617rKlIU2Eqo2nG0iXC2ss+3POk+fhAcqbizrQoY QxHE+1/CbFCF/95ao4cDHXrLLqDsCTn/MwNV4Rk2zy8IxsHMkdqeUxgYTDjXXWIm39Tg cjvZaJJ8tKdxWrE1U/UiTHuqgnzWoj2qRuKEwDx+cxEUM/EK+zwA4FsdxE34hosVnp6n d5rvnNO1jLRbG6sAzm5lJYSlpJYay5KNA7PhH0gDUXIudvUkPobo0vXEyX7DabXRPKIl IcZrKwV0YO2ot6ZD+l+igAhIilmElYmvAFidoaR9ctTuAg8W4CiPGBafRAZRXT0Nvsjq SGMg== X-Gm-Message-State: AIVw110wS02bUu7ghp5AbatdtQwheO54CppUMoFQEbT1qwRF54Twev62 ur0S6xYozLSaUljmYvpURakULFMW8A== X-Received: by 10.129.175.74 with SMTP id x10mr13900648ywj.319.1501441285786; Sun, 30 Jul 2017 12:01:25 -0700 (PDT) MIME-Version: 1.0 Sender: jakub.php@gmail.com Received: by 10.129.116.135 with HTTP; Sun, 30 Jul 2017 12:01:25 -0700 (PDT) In-Reply-To: References: <4F.AF.40376.40EBC795@pb1.pair.com> Date: Sun, 30 Jul 2017 20:01:25 +0100 X-Google-Sender-Auth: b9f59SEcA_uR_EtFscb8vJTCsCs Message-ID: To: Niklas Keller Cc: Andrea Faulds , PHP Internals , Sara Golemon Content-Type: multipart/alternative; boundary="f403045f28ea7d90ed05558d8a21" Subject: Re: [PHP-DEV] json_encode() / json_decode() warnings From: bukka@php.net (Jakub Zelenka) --f403045f28ea7d90ed05558d8a21 Content-Type: text/plain; charset="UTF-8" On Sat, Jul 29, 2017 at 7:10 PM, Niklas Keller wrote: > Andrea Faulds schrieb am Sa., 29. Juli 2017, 18:55: > > > Hi Craig, > > > > Craig Duncan wrote: > > > On 29 July 2017 at 15:16, Andrea Faulds wrote: > > > > > >> Could we not simply make it a flag? e.g. > > >> > > >> $bar = json_encode($foo, JSON_THROW_EXCEPTIONS); > > >> $baz = json_decode($bar, false, 512, JSON_THROW_EXCEPTIONS); > > >> > > >> That wouldn't break backwards-compatibility, but would still provide > the > > >> desired functionality. :) > > > > > > > > > Hi Andrea, although that wouldn't break compatibility, it doesn't > protect > > > new developers from using them dangerously. > > > That desired functionality is available in many userland libraries, I > > don't > > > think we gain much from adding it to core. > > > My aim is to make the core functions easier/safer to use out of the > box. > > > > That's true, but if we add it to core we can save people reimplementing > > it themselves or adding an extra dependency, and perhaps more > > pertinently, it could be the first step to making this the default > > behaviour. > > > > Thanks for that very good idea. > > @Sara: Can we please get that into 7.2? > I agree that it might be a useful feature for some users but I don't see any need to break a release rules for that (I mean adding new features in beta stage). Also the PR needs to have a full agreement which is not the case atm. (still some open questions) so I wouldn't definitely rush with adding that to 7.2. This should go just to master if all parts are agreed IMHO. That's of course up to RM and this is just my opinion. :) --f403045f28ea7d90ed05558d8a21--