Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:62787 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47544 invoked from network); 4 Sep 2012 11:40:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 4 Sep 2012 11:40:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=theanomaly.is@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=theanomaly.is@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.42 as permitted sender) X-PHP-List-Original-Sender: theanomaly.is@gmail.com X-Host-Fingerprint: 209.85.215.42 mail-lpp01m010-f42.google.com Received: from [209.85.215.42] ([209.85.215.42:35961] helo=mail-lpp01m010-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 43/10-46870-8A8E5405 for ; Tue, 04 Sep 2012 07:40:25 -0400 Received: by lahl5 with SMTP id l5so4201907lah.29 for ; Tue, 04 Sep 2012 04:40:20 -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=0SaYURZsFcf4mvgssXyw95ZXv5D/4qKr2+CarCBAfIg=; b=aSso219uFUn4Kjwx0uUr0igB2ZVcuJaVJ84nskYL3Ws/hxtjKMJb05FCdJnSlcuRm/ aZlLEe7Z2cNFiDlytT2qMFvhZpWj6rincNX9NyUJS5ZeyE1McPFFeSjeQBGMoPW+C9Z8 geOQQZfZf8VdJniLBQnpaVezplmXk2CP2NaKpE32W1i83sTRDJgwYArrjeULhGqQNTYD deAOrjF2W5BP7d7eWdvbioGigQxXT7v6FlyHLa6xQ5MF/FPbGDfr+leUaS1PSF3boGgn 1OUNXPuSIy8qA6ycIZ+CcrQp+9czH50g6ijG70NxC5TmnyiuClK3SlWqsOe7SK0+BFDC JpOQ== MIME-Version: 1.0 Received: by 10.112.10.170 with SMTP id j10mr6619184lbb.39.1346758820015; Tue, 04 Sep 2012 04:40:20 -0700 (PDT) Received: by 10.112.12.178 with HTTP; Tue, 4 Sep 2012 04:40:19 -0700 (PDT) In-Reply-To: <5045E044.9080809@lsces.co.uk> References: <5040DC47.8000305@ajf.me> <5040F4D9.80206@sugarcrm.com> <5042946A.80204@sugarcrm.com> <5042A7D6.7050001@lerdorf.com> <50452713.3020307@sugarcrm.com> <5045CAA3.6000409@lsces.co.uk> <5045E044.9080809@lsces.co.uk> Date: Tue, 4 Sep 2012 07:40:19 -0400 Message-ID: To: Lester Caine Cc: PHP internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] E_STRICT 'errors' - was Are exceptions allowed in php core? From: theanomaly.is@gmail.com (Sherif Ramadan) On Tue, Sep 4, 2012 at 7:04 AM, Lester Caine wrote: > Pierre Joye wrote: >>> >>> How many of the major PHP user projects ARE currently strict compliant? >>> And >>> >how many are still requiring E_STRICT switched off in PHP5.4? >> >> This is a development and very useful. PHP does not enforce this mode. >> And like any other errors, it only ends in your logs. >> >> But this has been told to you a good dozen of times in the past, and >> it is really getting ridiculous to have to explain that over and over. > > > And the point of YOUR comments? > With E_STRICT enabled - as is the default on PHP5.4 - programs simply crash > if they have not been 'converted'! > E_STRICT can't crash you program. It's just like an E_WARNING or E_NTOICE level error. It's non-fatal. It does not inhibit the execution of code. > The QUESTION is a perfectly valid one ... especially when I've just hit yet > another current project that we have to make sure to disable E_STRICT when > they get transferred to a PHP5.4 machine! I have no doubt a lot more will > also be affected and so knowing the right answers is important. As perhaps > is understanding the reason some projects are not converting code? > What exactly is the question that you're posing to PHP Internals? An audit of how much code doesn't follow strict standards? Probably a lot. I've seen plenty of it in production myself and among them even the most popular PHP frameworks. Having tested Joomla on PHP 5.4 before a switch to production I recall seeing an actual drop in performance due to the sheer number of E_DEPRECATED and/or E_STRICT errors that the code produced. However, none of that prevented the code from running (or "crashing" as you say). All you have to do is change the error_reporting directive if you chose to ignore those errors for the time being. You simply don't have display_errors on in production anyway so the worst possible outcome here is that you end up with an error log stuffed with those errors. Nothing critical here. This is not even a minor concern for most code basis that exhibit this problem to a great degree because the majority of them aren't willing to upgrade to 5.4 or have realized the problem by now and are fixing their code. > While the preference on PHP5.4 may be to force people to comply, the reality > is that this is a switch which it's more likely needs switching off in > production simply because user land has no idea how to handle the problems > yet. And I'll keep banging on until what is distributed from the php.net > site actually works on a current default install ... > The userland problem is a trivial issue. All they have to do is turn display_errors off in production as is recommended and is the default anyway. There is nothing major here to hold you back other than yourself. > > -- > Lester Caine - G8HFL > ----------------------------- > Contact - http://lsces.co.uk/wiki/?page=contact > L.S.Caine Electronic Services - http://lsces.co.uk > EnquirySolve - http://enquirysolve.com/ > Model Engineers Digital Workshop - http://medw.co.uk > Rainbow Digital Media - http://rainbowdigitalmedia.co.uk > > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >