Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100077 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 60622 invoked from network); 28 Jul 2017 11:41:28 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2017 11:41:28 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@duncanc.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@duncanc.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain duncanc.co.uk from 209.85.220.173 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 209.85.220.173 mail-qk0-f173.google.com Received: from [209.85.220.173] ([209.85.220.173:34014] helo=mail-qk0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 9A/73-40376-8E22B795 for ; Fri, 28 Jul 2017 07:41:28 -0400 Received: by mail-qk0-f173.google.com with SMTP id u139so55631558qka.1 for ; Fri, 28 Jul 2017 04:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duncanc-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RnsWkJ9CN2vmrhYqwa9pVBxZM81pnh+KqZJBTrJaPNE=; b=fHEWaD0GesdYmancpV72ICPV9yFJUahReGESswR9DsZReJhmsnDMcscD4FO3neQSsi 0riBj3Evb4h3DyurR6b+yfFGjLgiIzArS3DaQXXgqaZJ19h3tIhzpcgCmq4WQ2WCpaCm tIfvq8pT3mBBVjCYBv8uTmn6oK/9Pcej7g7pMypbcrtc43IuSgTF+CWaY0RrlJARwQX5 MY1tv4F1DK9rBdsuO0s2YxQOumde/jZsQT+FA8/uifc3LCNVkg4mmHf7tl/p58ffs9Ec M05AhDx5VTMaXEkVbEyDFIAHdPMgJGjqgSCMOIuF0OihOK164uQUFVY4fKj8NHUQ+B2N e70Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RnsWkJ9CN2vmrhYqwa9pVBxZM81pnh+KqZJBTrJaPNE=; b=fo4ZA4mnOuWvyf5dKdouYk5ROFwvZZdcgVD0xosuLrBvZjo2I1g5E9eQ/V1/CoPaBL LzkpS6NS30dT5yYi5khCVnM1MX6+SLDH1xgTxZ9G7Zfz5XlpwfFsRg3qIRe+Lguju9Dv hDPtQCL/YL8H/yvLDC8dMRy9c6qVyon0w+z8lgrOeB9rSP3oiK8gy9+9Fjp0L+RmySMj 9ANQd8Lgzi+lPTd6vAT0ueskAWH3433hVZecnHYhQ3Bgn/6VZHH3BuEcL1ibrN75eTs4 wXlH/oFJnn/NO63+aLj737Y5Fd94zWuqcUfYSS0j2+NVt05ivSU5DXuLpMm6/bfSlp// Wirw== X-Gm-Message-State: AIVw111P4YsgMwZrIVDqfi1zgGR6EfJXkKHURGr5pf9B9u9zaeTbM7A7 YyB+crCYx1bTl2VZals= X-Received: by 10.55.107.130 with SMTP id g124mr9735206qkc.210.1501242085562; Fri, 28 Jul 2017 04:41:25 -0700 (PDT) Received: from mail-qt0-f169.google.com (mail-qt0-f169.google.com. [209.85.216.169]) by smtp.gmail.com with ESMTPSA id b68sm4406969qkc.88.2017.07.28.04.41.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 04:41:24 -0700 (PDT) Received: by mail-qt0-f169.google.com with SMTP id p3so75469541qtg.2 for ; Fri, 28 Jul 2017 04:41:24 -0700 (PDT) X-Received: by 10.200.36.74 with SMTP id d10mr10646335qtd.298.1501242083927; Fri, 28 Jul 2017 04:41:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.25.163 with HTTP; Fri, 28 Jul 2017 04:41:23 -0700 (PDT) X-Originating-IP: [195.99.194.20] In-Reply-To: References: Date: Fri, 28 Jul 2017 12:41:23 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Jakub Zelenka Cc: Internals Content-Type: multipart/alternative; boundary="001a113f40c6227e3b05555f2951" Subject: Re: [PHP-DEV] [RFC] Raise warnings for json_encode() and json_decode() issues From: php@duncanc.co.uk (Craig Duncan) --001a113f40c6227e3b05555f2951 Content-Type: text/plain; charset="UTF-8" On 28 July 2017 at 12:36, Jakub Zelenka wrote: > > Also it would break a big amount of code because in case of converting > errors to exceptions, you start getting a different exception so it would > have to be handled. I would call the whole proposal just a big BC break > (I'm aware that we don't consider adding warnings as BC but in this case it > is) for no benefit at all! > > Hi Jakub, thanks for sharing you opinion. While I agree there are BC concerns, I don't think it's accurate to say no benefit at all. I regularly see new (and experienced) developers using these functions without checking `json_last_error()`, trying to figure out why the app is failing later without any warnings in the log can be very difficult. --001a113f40c6227e3b05555f2951--