Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:58686 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 72168 invoked from network); 6 Mar 2012 21:26:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 6 Mar 2012 21:26:23 -0000 Authentication-Results: pb1.pair.com header.from=keisial@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=keisial@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: keisial@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:42362] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CC/FD-32184-EF0865F4 for ; Tue, 06 Mar 2012 16:26:23 -0500 Received: by wibhj13 with SMTP id hj13so2843383wib.29 for ; Tue, 06 Mar 2012 13:26:19 -0800 (PST) Received-SPF: pass (google.com: domain of keisial@gmail.com designates 10.180.93.233 as permitted sender) client-ip=10.180.93.233; Authentication-Results: mr.google.com; spf=pass (google.com: domain of keisial@gmail.com designates 10.180.93.233 as permitted sender) smtp.mail=keisial@gmail.com; dkim=pass header.i=keisial@gmail.com Received: from mr.google.com ([10.180.93.233]) by 10.180.93.233 with SMTP id cx9mr14716146wib.14.1331069179015 (num_hops = 1); Tue, 06 Mar 2012 13:26:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=fn8Uj104Qkij47PR8qBuRdOxOuHvykT9V0uXEIFr8CU=; b=bA5ujC/ACTDjtkx9zceR3LIkrh5ZoPy13aaaNKm1MdMRTyQhwugWNBlvSJPvCcugy2 /jlZLih2uSO5BrQGvQFiScOnBV3JrcwZ4P7KiFyuSiTW9hVIeUUFYzNp9pelpZlhhgUN aDIvaP1i9ZIkCCrAl5DfJ/YltmjJ1mLLo1d2shpkyWhfAEz9Zka+EmyJashC5g1BbWhg ahNom6U/4Did1rg0D0EmWR3yonEDsmEkBBSOwRN9QRaFvsu6HE8EkLq9ASqG3Uz62DUO eF0wTqei92RxP2RtX1cz88neX8tNutN7C0AmK2OPX4wPxC66ZUJZ6s8cQo45npW9p1qM pDbg== Received: by 10.180.93.233 with SMTP id cx9mr11626839wib.14.1331069178819; Tue, 06 Mar 2012 13:26:18 -0800 (PST) Received: from [192.168.1.26] (86.red-80-28-65.adsl.dynamic.ccgg.telefonica.net. [80.28.65.86]) by mx.google.com with ESMTPS id be4sm84469469wib.8.2012.03.06.13.26.17 (version=SSLv3 cipher=OTHER); Tue, 06 Mar 2012 13:26:18 -0800 (PST) Message-ID: <4F568223.1060405@gmail.com> Date: Tue, 06 Mar 2012 22:31:15 +0100 User-Agent: Thunderbird MIME-Version: 1.0 To: Alan Knowles CC: PHP internals References: <4F563667.7080006@akbkhome.com> In-Reply-To: <4F563667.7080006@akbkhome.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] consider reverting E_ALL with E_STRICT From: keisial@gmail.com (=?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?=) On 06/03/12 17:08, Alan Knowles wrote: > I just got caught on a production server with the 5.4 upgrade on > debian, pretty much everything works fine, except the E_ALL change. > > I have to admit I missed the discussion where it was added, and > searching for E_ALL or E_STRICT on marc is pretty difficult (it > removes the E_ bit..) > > Anyway, this change is a bit of an bomb on the code on the first > server to get hit with this, While i've never cared for E_STRICT (it's > more like E_ANAL) - most of the warnings are pointless code tidy up's > that only have pretty much zero cost/return in fixing. > > However, this change really kills code written by third parties, All > our servers run with E_ALL on (eg. E_NOTICE is printed to end users) > and we fix instantly any errors that the end users see, as they are > frequently issues that should have been addressed. These applications > are intra/extranet apps, not public websites. > > However with E_STRICT included we have to run around and find all the > code, and change it to stuff like this: > > error_reporting(E_ALL & E_STRICT ? E_ALL ^ E_STRICT : E_ALL); error_reporting(E_ALL & ~E_STRICT); will work everywhere. You could even do a global search and replace of E_ALL to (E_ALL & ~E_STRICT), assuming it never appears in eg. a string. PS: I also consider E_STRICT a mostly helpful resource, and not using display_errors on production the sensible thing to do.