Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62029 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 29201 invoked from network); 4 Aug 2012 00:22:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Aug 2012 00:22:14 -0000 Authentication-Results: pb1.pair.com header.from=tyra3l@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=tyra3l@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.160.42 as permitted sender) X-PHP-List-Original-Sender: tyra3l@gmail.com X-Host-Fingerprint: 209.85.160.42 mail-pb0-f42.google.com Received: from [209.85.160.42] ([209.85.160.42:63849] helo=mail-pb0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EE/C6-23476-53B6C105 for ; Fri, 03 Aug 2012 20:22:14 -0400 Received: by pbbrp12 with SMTP id rp12so2348382pbb.29 for ; Fri, 03 Aug 2012 17:22:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=d/x+s8hjyLH2aA8NX2Zzns16mARb2y/95SMAPQb1E8w=; b=K5mdPSuO58uCEuzxlhtZOupL2lfdYFXwdvRrmzVQ9o9EWFwVvfNdKn5PWHyceErdzx bZuTr80zNllQC2iUg0sq8VuTX9MSYw1D98Y9WS//zdHMbucIOI6yJgCpwZpSlENsR7ur s8qgOhCsEyQoBfO8BUKTG8lz4r4NvIROhRmZe0B0ibwyMlpd1YB6g+3S5jbNUwrP0StL ug06ceNkKhnQrCgm1GDrBhDeOXRZaXWAvqYyGi7N0oHvxR/NhCVLkMp5z+mIP5LcRJFK h+1hvHe9B1lt5np3sdRmDSoRgiXOFlzLWba0mXqeJm8HFCnGrzT9IUcWZnkq3MT+OpzE iv1Q== MIME-Version: 1.0 Received: by 10.66.81.232 with SMTP id d8mr2160583pay.66.1344039730832; Fri, 03 Aug 2012 17:22:10 -0700 (PDT) Received: by 10.68.28.41 with HTTP; Fri, 3 Aug 2012 17:22:10 -0700 (PDT) In-Reply-To: <250022DBD6DE4F50BBAD1CB655909382@pc> References: <6214E40C106D49398CC920D8587815B4@pc> <250022DBD6DE4F50BBAD1CB655909382@pc> Date: Sat, 4 Aug 2012 02:22:10 +0200 Message-ID: To: Stan Vass Cc: Nikita Popov , PHP Internals , Andrew Faulds , Etienne Kneuss Content-Type: multipart/alternative; boundary=f46d042f972cb8651e04c665a2c2 Subject: Re: [PHP-DEV] Error handling brainstorming From: tyra3l@gmail.com (Ferenc Kovacs) --f46d042f972cb8651e04c665a2c2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Aug 4, 2012 at 1:44 AM, Stan Vass wrote: > ** > > > On Sat, Aug 4, 2012 at 1:16 AM, Stan Vass wrote: > >> When I said I'd like to see E_STRICT be fatal/exceptions it wasn't a >> typo. My choice isn't based as much on what the current error severity i= s, >> or what the error severity is supposed to represent in general, because >> I've found in PHP often the error severity has no connection with the er= ror >> that's being reported. So I decided this by observing the real-world err= ors >> that use a certain severity. >> >> Many warnings and all E_STRICT errors clearly point to bugs in the code, >> wrong method signatures, non-existing variables and constants being used= , >> which can easily do actual data damage if the script keeps running in >> undefined state (even if the engine is just fine with it). >> > > are you sure about that? > E_STRICT is more about code that works but relying on some quirk or > side-effect or simply does a stupid thing. > > > Well think about it. Why is it a goal to let quirky/stide-effect/stupid > code run? This almost always ends badly. > > It also reduces compatibility between code libraries. I.e.: > my words aren't getting through to you. > > it is the opposite, we allowed sloppy code in the past, and introduced > E_STRICT to allow the pedantic people to find and fix the quirks and > E_DEPRECATED for finding and migrating the code which will go away. > > > If you use a well tested, popular library by "sloppy" coders who don't > mind E_STRICT and E_NOTICE, but you're "pedantic", what happens? You have > to live with your error log filled with noise from the library or fork th= e > library. > > And when the "sloppy" coders miss bugs because they've decided the real > PHP is about sloppy code that still works somehow, they miss bugs and the= n > blame themselves or PHP for being a language that allows buggy code. > > This is the end result if trying to turn PHP into everything for > everybody. Instead, PHP should make up it's mind and stop littering the > php.ini with semantics/behavior configuration for the language. > > Have one behavior. Stick with it. Make it obvious. > if we turn E_STRICT to behave exactly as E_ERROR there is no point keeping the E_STRICT level. personally I disagree with turning something which was a pedantic notice in one version into an unsupported feature which fatals out if you try to use it in the next. maybe E_STRICT->E_DEPRECATED->E_ERROR --=20 Ferenc Kov=C3=A1cs @Tyr43l - http://tyrael.hu --f46d042f972cb8651e04c665a2c2--