Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45354 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 13496 invoked from network); 24 Aug 2009 20:07:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 Aug 2009 20:07:42 -0000 Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 63.205.162.117 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 63.205.162.117 us-mr1.zend.com Linux 2.4/2.6 Received: from [63.205.162.117] ([63.205.162.117:50105] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/90-03363-D03F29A4 for ; Mon, 24 Aug 2009 16:07:41 -0400 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 7EA56E1245; Mon, 24 Aug 2009 12:54:54 -0700 (PDT) Received: from [192.168.16.83] ([192.168.16.83]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 Aug 2009 13:01:08 -0700 Message-ID: <4A92F13B.9000204@zend.com> Date: Mon, 24 Aug 2009 12:59:55 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Ilia Alshanetsky CC: 'PHP Internals' References: <4A92D936.2010107@zend.com> <9E8BD3A3-8915-4492-88A9-7EA1A0CF6D86@prohost.org> <4A92DC60.2050606@zend.com> <4A92EA60.6020605@zend.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 24 Aug 2009 20:01:08.0304 (UTC) FILETIME=[9EC8FD00:01CA24F5] Subject: Re: [PHP-DEV] [patch] error masks From: stas@zend.com (Stanislav Malyshev) Hi! > Because it may force to fix the errors, rather then ignore them? Come on. That doesn't make any sense. If people deliberately disabled the error, they don't want to see it, and they will not see it. Making it slow doesn't do anything useful. Let's insert some sleep()'s into zend_error() too, would it make it better? Let's make E_DEPRECATED take 5 seconds, that'll show them. Making engine work slow to force people into some behavior is very misguided idea. I can't believe it is proposed to make invisible slowdowns in unknown places as a means to make people write better code. > There is very little modern code that is @ ridden like the stuff written If we discard emotional terms like "ridden" - there is such code in almost every major app out there. Just search for @fopen or @include or @xml or @eval - tons of examples. Ans the reason is simple - people do not always want PHP to display/log errors for them. Sometimes they don't care for the errors, sometimes they want to handle the error by other means. > before. The way to have the engine not do the work, would be as simple > as fixing the code, which is the right solution here. What you still can't see if that this code is not broken, there's nothing to fix - this code is EXPLICITLY saying "do this, and if there's a error - ignore it". That's what the author wants. It's not an omission or mistake - it's intentional, it's part of the requirements. Only error_reporting now is broken so ignored errors waste excessive time. The right solution here is to fix error system so ignored errors not waste excessive time. > The production value we use according to php.ini-production is E_ALL & > ~E_DEPRECATED, which means E_NOTICE will not be hidden. Which conveniently ignores my argument about all other error types and bigger argument that THERE ARE such types and people ignore them on purpose, not because they are stupid. > Well, if you are going to hide them, the no one will ever debug them, > let alone know that they exist. How one would know they exist if reporting is disabled? By guessing it from the slowdown? I can't believe deliberately slowing down user applications in unknown places is really being recommended as a way of debugging. The fact is we have error_reporting and @, and however you may hate them, they exist and they are used. My patch only makes them do what they should be doing from the start, while keeping BC and allowing a bit more flexibility in advanced cases where you have special needs (like monitoring system that collects unreported errors, etc.). -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com