Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:46023 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89579 invoked from network); 11 Nov 2009 09:53:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Nov 2009 09:53:22 -0000 Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pooteeweet.org from 88.198.8.16 cause and error) X-PHP-List-Original-Sender: mls@pooteeweet.org X-Host-Fingerprint: 88.198.8.16 bigtime.backendmedia.com Linux 2.6 Received: from [88.198.8.16] ([88.198.8.16:41697] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 36/F3-65174-1998AFA4 for ; Wed, 11 Nov 2009 04:53:22 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id 5B4E14144057; Wed, 11 Nov 2009 09:53:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at backendmedia.com Received: from bigtime.backendmedia.com ([127.0.0.1]) by localhost (bigtime.backendmedia.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OVbE4qELPMts; Wed, 11 Nov 2009 10:53:27 +0100 (CET) Received: from [192.168.80.71] (unknown [195.226.16.50]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: mls@pooteeweet.org) by bigtime.backendmedia.com (Postfix) with ESMTP id A7EA0414400B; Wed, 11 Nov 2009 10:53:27 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1076) Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes In-Reply-To: <10845a340911110147i647003f3rded43fca844c08fb@mail.gmail.com> Date: Wed, 11 Nov 2009 10:53:12 +0100 Cc: "internals@lists.php.net" Content-Transfer-Encoding: 7bit Message-ID: <1E1EE057-D55D-4FEA-AD07-F8E670C9C748@pooteeweet.org> References: <413588E2-8AC8-49F7-B7BF-97BEFB0A71E4@pooteeweet.org> <4AF9A03E.8000207@cschneid.com> <4AF9AE1A.9000005@zend.com> <4AF9C589.3090604@chiaraquartet.net> <4AF9CCEA.1030500@zend.com> <4AFA0449.2030600@chiaraquartet.net> <4AFA0756.4020609@zend.com> <4AFA0A38.7000502@chiaraquartet.net> <10845a340911110147i647003f3rded43fca844c08fb@mail.gmail.com> To: RQuadling@googlemail.com X-Mailer: Apple Mail (2.1076) Subject: Re: [PHP-DEV] Re: alternative to the fopen() hack in autoloaders From: mls@pooteeweet.org (Lukas Kahwe Smith) On 11.11.2009, at 10:47, Richard Quadling wrote: > 2009/11/11 Lukas Kahwe Smith : >> [snip] > > Would using a userland-based set_error_handler() be of use here? > > If, under normal circumstances, blind include() is what is used, then > trapping the error when it fails would be when you could test for > whatever it is you want to test for? Well this makes it impossible to handle the issue locally, which creates all sorts of issues when you just want to drop in a frameworks autoloader. It also means that you now globally handle such failures, where you do not know if in case the file is missing there will be additional logic locally to handle the failure. Furthermore unless you use track errors you would not be able to determine if the load failed because of a missing file or a syntax error. regards, Lukas Kahwe Smith mls@pooteeweet.org