Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100071 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49176 invoked from network); 28 Jul 2017 11:00:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2017 11:00:01 -0000 Authentication-Results: pb1.pair.com header.from=php@duncanc.co.uk; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@duncanc.co.uk; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain duncanc.co.uk from 209.85.220.172 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 209.85.220.172 mail-qk0-f172.google.com Received: from [209.85.220.172] ([209.85.220.172:37418] helo=mail-qk0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 1A/01-40376-F291B795 for ; Fri, 28 Jul 2017 06:59:59 -0400 Received: by mail-qk0-f172.google.com with SMTP id z18so35981416qka.4 for ; Fri, 28 Jul 2017 03:59:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=duncanc-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=47ZooPcbznxV5TYqCSfaxs37f8T8ldaWTvjhqDcO2qg=; b=zz5q/JkI7rmbIoW1VJrz4avG4zCMEXM+OMFjpYv6epXJ25GJtkRJe1xR1Q0q8hX4K/ ikcDzT2X6BZrcLYOBW++YRv5PNMZHgp8ojbkywv7xBAIPsM3/cYrSzydvpRowsazKnOU JM2gjI9sXC1cnAK/Wr9xNGcCRyO1g0RgY2yTZanJGLeLFBj8A81mo6FiXM129wTYCwdu +WIyOc3wFd9HzFwughe0/SlvoYNw6diNRVzw0zg9VpA7WHRX1QJJEqa9Q8f7RmGmLupg +nzhr5qEGSG3wvJ4+vLSn8Q4UbJ5ipGwkhmllq5iuRnGiifIL6pY03lEb8SEPcWjaP0e BJ5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=47ZooPcbznxV5TYqCSfaxs37f8T8ldaWTvjhqDcO2qg=; b=YFRJQl5Vp+uXVhyjiSG0mv5baJlVXZxJ3ljNwtDzps62cu1WNfcHFnEBUMWSe6NaDg jX5MwmiN83SoxzaFyzdbM0rqCtcjncJKHUyE5STbCmHrH+9m3y/p0M5SADXu34FIwEED UAmKVwWz3nE8UYSW4jknywkHDX2puKCgB9TIUg1p+uPw7PTpQ9cXa+gRUPY3oIihLu8c yvaEyuh9Guu+TxlYO+NbFzIlHDkcie9x1iL98qgIPcxW8DqzY3WjluSDrEC2TgT8fSug yyLvm1Ekca8/ph9VukK0xZDxYE7W6h7YGnpgSZUNoesSkd0k0FUNREcHGh3h3HE5Rsn3 pMIg== X-Gm-Message-State: AIVw112sxcHVA3sb4ukLvyctByQZAasdXaBIfiQNOiGENWBwTpcYykH0 YRcClfOEIt0T3I/nyC4= X-Received: by 10.55.40.218 with SMTP id o87mr9110718qko.50.1501239596292; Fri, 28 Jul 2017 03:59:56 -0700 (PDT) Received: from mail-qk0-f172.google.com (mail-qk0-f172.google.com. [209.85.220.172]) by smtp.gmail.com with ESMTPSA id k15sm2363781qtk.33.2017.07.28.03.59.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 03:59:55 -0700 (PDT) Received: by mail-qk0-f172.google.com with SMTP id d145so110665275qkc.2 for ; Fri, 28 Jul 2017 03:59:54 -0700 (PDT) X-Received: by 10.55.130.66 with SMTP id e63mr9993188qkd.253.1501239594530; Fri, 28 Jul 2017 03:59:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.25.163 with HTTP; Fri, 28 Jul 2017 03:59:54 -0700 (PDT) X-Originating-IP: [195.99.194.20] Date: Fri, 28 Jul 2017 11:59:54 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Internals Content-Type: multipart/alternative; boundary="94eb2c072b68c16fc405555e9457" Subject: [PHP-DEV] [RFC] Raise warnings for json_encode() and json_decode() issues From: php@duncanc.co.uk (Craig Duncan) --94eb2c072b68c16fc405555e9457 Content-Type: text/plain; charset="UTF-8" Hi internals. As my initial thread about introducing warnings to the JSON functions was not immediately flooded with disagreement I took the liberty of creating an RFC for official discussion. The proposal is to have `json_encode()` and `json_decode()` raise warnings whenever a failure occurs, instead of requiring the developer to call `json_last_error()` each time. The functionality of `json_last_error()` and `json_last_error_msg()` are unaffected and they can still be used in exactly the same way they are today https://wiki.php.net/rfc/json_encode_decode_errors Thanks, Craig --94eb2c072b68c16fc405555e9457--