Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:60952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80859 invoked from network); 23 Jun 2012 23:03:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Jun 2012 23:03:35 -0000 Authentication-Results: pb1.pair.com smtp.mail=johannes@schlueters.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=johannes@schlueters.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain schlueters.de from 217.114.211.66 cause and error) X-PHP-List-Original-Sender: johannes@schlueters.de X-Host-Fingerprint: 217.114.211.66 config.schlueters.de Received: from [217.114.211.66] ([217.114.211.66:40192] helo=config.schlueters.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/81-04949-54B46EF4 for ; Sat, 23 Jun 2012 19:03:34 -0400 Received: from [192.168.2.230] (ppp-93-104-16-16.dynamic.mnet-online.de [93.104.16.16]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by config.schlueters.de (Postfix) with ESMTPSA id 355BA612B8; Sun, 24 Jun 2012 01:03:30 +0200 (CEST) To: Nikita Popov Cc: Stas Malyshev , Rasmus Lerdorf , Daniel Convissor , PHP internals In-Reply-To: References: <20120621141241.GA25789@analysisandsolutions.com> <4FE33EDF.2000409@lerdorf.com> <4FE61E9D.5050908@sugarcrm.com> Content-Type: text/plain; charset="UTF-8" Date: Sun, 24 Jun 2012 01:03:24 +0200 Message-ID: <1340492604.11164.14.camel@guybrush> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] json_encode() behavior for incorrectly encoded strings From: johannes@schlueters.de (Johannes =?ISO-8859-1?Q?Schl=FCter?=) On Sun, 2012-06-24 at 00:24 +0200, Nikita Popov wrote: > Yes, I feel like we must discuss this a thousand times anew. There > clearly is no consensus about it. Just look at the responses in this > thread and in other discussions relating this issue. When people read > "throws a warning, but only if display_errors=Off" they automatically > replace the Off with an On in their mind. The behavior is simply that > unintuitive. Maybe it is simply time to rethink the error handling. The current system doesn't really allow to distinguish between "debugging help" and true "error reporting". I don't have a good proposal, but recently I often struggled whether to throw an E_NOTICE from some code in order to help the user while debugging and found myself adding extension-specific error handling routines ... this case here seems to suffer from a related problem. Anybody up for an RFC? (This might also include cleanup the usage of exceptions for internals, and probably converting E_RECOVERABLE to exception) johannes, just throwing some thoughts in the discussion