Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45385 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47889 invoked from network); 25 Aug 2009 06:44:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Aug 2009 06:44:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; 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:50271] helo=us-mr1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D0/52-33714-558839A4 for ; Tue, 25 Aug 2009 02:44:38 -0400 Received: from us-gw1.zend.com (us-ex1.zend.net [192.168.16.5]) by us-mr1.zend.com (Postfix) with ESMTP id 25BC6E1243; Mon, 24 Aug 2009 23:31:50 -0700 (PDT) Received: from [192.168.27.6] ([192.168.27.6]) by us-gw1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 24 Aug 2009 23:44:36 -0700 Message-ID: <4A93880A.9080408@zend.com> Date: Mon, 24 Aug 2009 23:43:22 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Daniel Convissor CC: PHP Internals List References: <4A92D936.2010107@zend.com> <9E8BD3A3-8915-4492-88A9-7EA1A0CF6D86@prohost.org> <4A92DC60.2050606@zend.com> <4A92EA60.6020605@zend.com> <4A92F13B.9000204@zend.com> <20090825030925.GA21165@panix.com> In-Reply-To: <20090825030925.GA21165@panix.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 25 Aug 2009 06:44:36.0817 (UTC) FILETIME=[83408C10:01CA254F] Subject: Re: [PHP-DEV] [patch] error masks From: stas@zend.com (Stanislav Malyshev) Hi! > @ is often used to stop error/warning output to the browser on that line, > but the next couple lines of code are used to handle that error. For > example: > > if (!($dom = @DOMDocument::load($file_name))) { > log_it('invalid XML: ' . $php_errormsg); > die('invalid XML'); > } > > So if error processing is totally turned off, $php_errormsg won't be > populated. That's true. So, if you use code that uses $php_errormsg, of course you can not use this optimization and should not enable it (at least for error types and code parts that you use $php_errormsg with). Also, if you use @ to stop warning output to the browser you should read the manual about display_errors and part of the security guidelines when it says never enable display_errors in production ;) -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com