Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32621 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54294 invoked by uid 1010); 3 Oct 2007 21:58:59 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 54279 invoked from network); 3 Oct 2007 21:58:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Oct 2007 21:58:59 -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 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:30795] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 44/A2-38275-2A014074 for ; Wed, 03 Oct 2007 17:58:59 -0400 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 3 Oct 2007 23:58:57 +0200 Received: from [127.0.0.1] ([192.168.16.180]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.1830); Wed, 3 Oct 2007 14:54:04 -0700 Message-ID: <47040F7A.6050207@zend.com> Date: Wed, 03 Oct 2007 14:54:02 -0700 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Gregory Beaver CC: internals Mailing List References: <470334FE.7050808@chiaraquartet.net> In-Reply-To: <470334FE.7050808@chiaraquartet.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Oct 2007 21:54:04.0672 (UTC) FILETIME=[EA5F7000:01C80607] Subject: Re: [PHP-DEV] [PATCH] in_class_exists() for detecting __autoload() called by class_exists() and interface_exists() From: stas@zend.com (Stanislav Malyshev) > to use die() or some other method of terminating execution. A user > calling class_exists() clearly expects a return from autoload, whereas a > user instantiating an object will expect a fatal error if the class > cannot be found. This is true, but __autoload should never do it, the engine should do it. So I think it's better just not make autoloader *ever* produce errors. Can't find it - just give up, if engine really needs it it'd bail out :) > This is useful for PEAR2 as a means of displaying helpful information on > locating missing class files only in cases where a fatal error would > result anyways. Well, autoloader might print debug traces etc. if the developer wants it, but I don't see why this should be unique feature for class_exists. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com