Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:84383 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 95996 invoked from network); 6 Mar 2015 15:18:15 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2015 15:18:15 -0000 Authentication-Results: pb1.pair.com smtp.mail=patrick.allaert@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=patrickallaert@php.net; sender-id=unknown Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.44 as permitted sender) X-PHP-List-Original-Sender: patrick.allaert@gmail.com X-Host-Fingerprint: 74.125.82.44 mail-wg0-f44.google.com Received: from [74.125.82.44] ([74.125.82.44:35451] helo=mail-wg0-f44.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 94/E1-16282-635C9F45 for ; Fri, 06 Mar 2015 10:18:14 -0500 Received: by wggz12 with SMTP id z12so60871106wgg.2 for ; Fri, 06 Mar 2015 07:18:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:references:from:date:message-id:subject:to :content-type; bh=aQCushrA2R5Ab8X2+huA754Oh8qFp2ySz9ilaFAN7Tc=; b=WrrhLcVz9wqJc/na1VWbndKMEmaSeX628j0g736ms5zHHmF31wBqRFUfoSoYKb0Ozr DLxhOANXIJrkzzO/3qrPNPb4DAZMz/oMUJJwPP33UeLQojdWTxrBG5CQOkBASIX9Cb7W 1rtq2xLwqeL19eMGkZ3b4Y1S2i2E5DiB2bHeAaBrHwPMJTyiyy3dxMJrtdCHPnOzT4il ztYTAcOniAb1/MQOzxzvCvVBzPi0Kha1TZT0B/Hij/1jZaz0m9tPIVj1pRo0AJQnDMyg V+DeNrpp7O/jVhf3R1J/bAtYR5kX1ZtUCL6VuOgOgESyiO1Pnn2IJwDrE++igzRrI0Wk Wlaw== X-Received: by 10.194.175.202 with SMTP id cc10mr30360034wjc.27.1425655091041; Fri, 06 Mar 2015 07:18:11 -0800 (PST) MIME-Version: 1.0 References: <075201d04f82$abd721d0$03856570$@php.net> Date: Fri, 06 Mar 2015 15:18:09 +0000 Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary=089e013d0f48461df00510a031b0 Subject: Pedantic errors (Was: Re: [PHP-DEV] [RFC][VOTE] Improve array to string conversion) From: patrickallaert@php.net (Patrick ALLAERT) --089e013d0f48461df00510a031b0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le lun. 23 f=C3=A9vr. 2015 =C3=A0 17:06, Fran=C3=A7ois Laupretre a =C3=A9crit : > Hi, > > Starting the vote for https://wiki.php.net/rfc/array-to-string. > > Please note that, while the initial RFC proposed both options of either > fully supporting the feature, or disabling it, the voting choices are now= : > > - either definitely disabling array to string conversion, > - or keep current behavior as-is. > > Vote ends March 6, 00:00 (UTC). > > Regards > > Fran=C3=A7ois > As said in the original thread [1], I'm not in favor of breaking the execution in the case of "Array to string" conversion with an E_RECOVERABLE_ERROR with no "opt-in" choice for that (which implies an important BC break). However, maybe there is a better option for those that want to be 'more "strict" and "explicit"' (quoting Pascal Martin [2]). Having the option to bail out at any kind of errors (E_NOTICE, E_WARNING,...) might fit that as well. gcc has a similar switch: "-pedantic-errors: Like -Wpedantic, except that errors are produced rather than warnings." This could be easily developed thanks to a configuration switch (off by default) or an "error_reporting"-like bit field instructing on which error level to bail out additionally. By doing so, we would let people opt-in for that kind of behaviour. Thoughts? [1] http://marc.info/?t=3D142470775700006 [2] http://marc.info/?l=3Dphp-internals&m=3D142559407125491 --089e013d0f48461df00510a031b0--