Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100074 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 56152 invoked from network); 28 Jul 2017 11:23:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Jul 2017 11:23:52 -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.216.177 cause and error) X-PHP-List-Original-Sender: php@duncanc.co.uk X-Host-Fingerprint: 209.85.216.177 mail-qt0-f177.google.com Received: from [209.85.216.177] ([209.85.216.177:37536] helo=mail-qt0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/82-40376-6CE1B795 for ; Fri, 28 Jul 2017 07:23:51 -0400 Received: by mail-qt0-f177.google.com with SMTP id 16so37541443qtz.4 for ; Fri, 28 Jul 2017 04:23:50 -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=yPIRRwlmCtWVltoWNjVwnkJraOURqtmg29Ty5SQotVk=; b=jvDtZFLLl4sXl3V2QzhlKR/TBu4VWgE2m8zg2YoidxMx5Ys+7L0YKtDJ3nT6Pa+HsW AtgFWNHbY6cKOnKW/tWeuP7TbOKPwmFtq3AtDGXYqJVJTAITjFtfLuN4P1F9w64nx2zE /Q/uUlABK/fYqCdifpKUkyOE6TcPGtwlDHeKHr6rz34Z8Soj/IMnY5yJeNszD3v8cSoD 08RGoB5oivfcyMG3fElBLTPuOBaRndppWCd7p25IDQGH1dYKFwpUSH9/jwfPx13cjdZt z9Ej5gkV2Ci0ldlRjxz32CCAEjf4nww/JzNafiHbU4IDwVsPcuGxIPbN0Vj7ilw+pQT2 eLVg== 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=yPIRRwlmCtWVltoWNjVwnkJraOURqtmg29Ty5SQotVk=; b=J+LPcx6Bw5omBHs6+KjeO7Mj0WqUmqtb5rxXlEWtcBex1hjzby+IOfd8F+llyxFvIP EHwR7ASq4pdBay+6udsOrWUH7+YHhNnsieNjGhZYTrJdkZKEzkg/n/opcnJ8uOTnIPk6 chpXUEH8GsPt9e/Mw0zGn7hxRUgYrI1tb0dztnMr9hCuW5BV6UfWiU/2XtfhACTWGiG9 dYIuYY0TUuKTMtr/21akqmrTkdlQiMd41rj5Flkhg63btW7MPPqvZ/y27IvihddGDWbV djQVLmWT+SdJVxee6J8Mcc6YteV5P5UtYflNumgcCGYodGgawa6AFJuE8NpeuOeb2fjJ hBGA== X-Gm-Message-State: AIVw112D4D+OfPQwOi4zSoJkV+uHYm++freOHiLairrZUNkzuVWTBTfO rZ1D+9RLkpZPBxf6TLQ= X-Received: by 10.200.48.233 with SMTP id w38mr1743778qta.168.1501241026706; Fri, 28 Jul 2017 04:23:46 -0700 (PDT) Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com. [209.85.220.176]) by smtp.gmail.com with ESMTPSA id c5sm14649902qkd.27.2017.07.28.04.23.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jul 2017 04:23:45 -0700 (PDT) Received: by mail-qk0-f176.google.com with SMTP id z18so36241098qka.4 for ; Fri, 28 Jul 2017 04:23:44 -0700 (PDT) X-Received: by 10.55.73.74 with SMTP id w71mr10501095qka.268.1501241024700; Fri, 28 Jul 2017 04:23:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.25.163 with HTTP; Fri, 28 Jul 2017 04:23:44 -0700 (PDT) X-Originating-IP: [195.99.194.20] In-Reply-To: References: Date: Fri, 28 Jul 2017 12:23:44 +0100 X-Gmail-Original-Message-ID: Message-ID: To: Nikita Popov Cc: Internals Content-Type: multipart/alternative; boundary="001a114a802e000da105555eea21" Subject: Re: [PHP-DEV] [RFC] Raise warnings for json_encode() and json_decode() issues From: php@duncanc.co.uk (Craig Duncan) --001a114a802e000da105555eea21 Content-Type: text/plain; charset="UTF-8" Hi Nikita, Thanks for your input. Would you vote yes for throwing an exception? On 28 July 2017 at 12:07, Nikita Popov wrote: > > Operations that are expected to fail should never generate warnings. We > should not design functions such that their correct use requires the use of > the error suppression operator. > > I certainly agree that the current situation is not good and that the json > functions really ought to be throwing exceptions, but adding a warning now > is only going to make this worse. > > Nikita > > --001a114a802e000da105555eea21--