Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45363 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51063 invoked from network); 24 Aug 2009 21:59:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2009 21:59:56 -0000 Authentication-Results: pb1.pair.com header.from=rasmus@lerdorf.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=rasmus@lerdorf.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lerdorf.com from 209.85.219.216 cause and error) X-PHP-List-Original-Sender: rasmus@lerdorf.com X-Host-Fingerprint: 209.85.219.216 mail-ew0-f216.google.com Received: from [209.85.219.216] ([209.85.219.216:62577] helo=mail-ew0-f216.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3F/D8-03363-B5D039A4 for ; Mon, 24 Aug 2009 17:59:56 -0400 Received: by ewy12 with SMTP id 12so3224405ewy.24 for ; Mon, 24 Aug 2009 14:59:53 -0700 (PDT) Received: by 10.210.53.2 with SMTP id b2mr5752206eba.51.1251151192963; Mon, 24 Aug 2009 14:59:52 -0700 (PDT) Received: from 89-dynamic.2014534.venues.thecloud.net (91-103-38-89.dynamic.thecloud.net [91.103.38.89]) by mx.google.com with ESMTPS id 5sm179880eyh.15.2009.08.24.14.59.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 24 Aug 2009 14:59:52 -0700 (PDT) Message-ID: <4A930D54.6050705@lerdorf.com> Date: Mon, 24 Aug 2009 23:59:48 +0200 User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 To: Lukas Kahwe Smith CC: Stanislav Malyshev , jani.taskinen@iki.fi, Ilia Alshanetsky , 'PHP Internals' References: <4A92D936.2010107@zend.com> <9E8BD3A3-8915-4492-88A9-7EA1A0CF6D86@prohost.org> <4A92DC60.2050606@zend.com> <4A92EA60.6020605@zend.com> <4A92F13B.9000204@zend.com> <4A92FFA8.1060401@zend.com> <4A9304FC.2000906@sci.fi> <4A930956.9070709@zend.com> <250F0E93-D6F2-490F-9129-598AC6E96500@pooteeweet.org> In-Reply-To: <250F0E93-D6F2-490F-9129-598AC6E96500@pooteeweet.org> X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [patch] error masks From: rasmus@lerdorf.com (Rasmus Lerdorf) Lukas Kahwe Smith wrote: > > On 24.08.2009, at 23:42, Stanislav Malyshev wrote: > >> Hi! >> >>> Quite boring to read this thread where two persons argue about >>> something abstract. Stas, can you give a real life example where your >>> patch is necessary..? >> >> Any code where you either use @ or error_reporting which is not -1 >> would benefit from it by not processing errors that go nowhere. I just >> looked at Zend Framework - with is pretty clean with regard to >> E_NOTICE/E_STRICT problems - and @ is used in dozens of classes >> around. The speedup would be probably not very big for whole RL >> application, but it's a 10-line patch, and little things help too. > > > well a few of those places would probably be fixable, by providing > functions to check beforehand if calling the final function would cause > an error. but that if course would add more overhead, but would still be > the "cleaner" solution. > > overall i am not so convinced about the ignoring approach. as for > E_STRICT .. that shouldnt become less of an issue now that we have > E_DEPRECATED .. but i guess that just means that in the future people > will complain about E_DEPRECATED .. > > anyways to me both E_STRICT and E_DEPRECATED are development tools that > can be totally ignored in production. however E_NOTICE should not occur > in production and we shouldnt encourage people to make them disappear > entirely. Lukas, the problem is that all messages, E_STRICT, E_DEPRECATED, E_NOTICE, whatever, all cause a performance hit even if the error_reporting level is such that they will never show up anywhere. That's what this patch is trying to address. To write optimal code, they have to be entirely clean of all messages including E_DEPRECATED and E_STRICT. -Rasmus