Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:51083 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2168 invoked from network); 19 Dec 2010 09:14:00 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Dec 2010 09:14:00 -0000 Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.42 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 209.85.216.42 mail-qw0-f42.google.com Received: from [209.85.216.42] ([209.85.216.42:60712] helo=mail-qw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 65/67-35939-7DCCD0D4 for ; Sun, 19 Dec 2010 04:13:59 -0500 Received: by qwj8 with SMTP id 8so1946414qwj.29 for ; Sun, 19 Dec 2010 01:13:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=4nAO96gm+hbWckoPgiA195tUTRQz3aX7WeBMJWyOYgA=; b=QmD1V+yrBp4W0OpMJqgL0jV60TYZ3uu/FmwDSDUFixq6ohuQbVR1nh/Bm6Agd9vRw1 /P1RqBg3zwjHa0UfWhpjA7HVlMZdd/0Z2kDeA5sYiodiHWNMXkCQO3SI35gB8/jvO5p/ marHcjtCgGdFhWda0frG6vIsLuT8MdW8XarNw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=dQLhiW02scQDiTrkdlj/HHWHoJj4XQwhaDs+mW+b8dy/ngDY9hPBn6joDXW6ChLfP/ oQMi3ls6+r8w0b1qYlTdUgBz1NlCGA8VnzcqcyNJqVj+mt8yT4kdIjlWwingtzzUR5Oa tNNqzKIjFKnU/lXUM9IpxJKs76zFJEpJmiUWw= MIME-Version: 1.0 Received: by 10.229.233.196 with SMTP id jz4mr2668990qcb.135.1292750035898; Sun, 19 Dec 2010 01:13:55 -0800 (PST) Received: by 10.229.186.200 with HTTP; Sun, 19 Dec 2010 01:13:55 -0800 (PST) In-Reply-To: <4D0D7CA1.8030200@sugarcrm.com> References: <4D0D7CA1.8030200@sugarcrm.com> Date: Sun, 19 Dec 2010 10:13:55 +0100 Message-ID: To: Stas Malyshev Cc: PHP Internals Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [PHP-DEV] [path] fixing errors, take 2 From: hannes.magnusson@gmail.com (=?ISO-8859-1?Q?Hannes_Magn=FAsson?=) On Sun, Dec 19, 2010 at 04:31, Stas Malyshev wrote: > Hi! > > Since my first attempt to make error reporting in PHP more efficient (see > epic thread here: > http://www.pubbs.net/200908/php/49633-php-dev-patch-error-masks.html) I > thought about another approach to fixing it. > This approach eliminates the need for additional .ini setting and shortcuts > only those errors that would not have any consequences - i.e. would not be > displayed, logged, stored, converted to exception or otherwise have any > effect on the outside world. The benefit of this approach is obvious - > nothing changes for the user, only the code runs faster. The cost is that we > add one handler to utility_functions and thus code that overrides error > callback (debuggers, etc.) would have to provide their own handler if they > want the same functionality (by default if this handler detects somebody > stole error callback it turns off). > The patch is attached. > Any objections for trunk? AFAICT from the patch.. if (@strpos()) {} else { var_dump(error_get_last()); } will give you the last error that happened before strpos()? -Hannes