Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25613 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57931 invoked by uid 1010); 11 Sep 2006 16:42:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57916 invoked from network); 11 Sep 2006 16:42:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 11 Sep 2006 16:42:20 -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 80.74.107.235 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [80.74.107.235] ([80.74.107.235:38475] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 5C/7D-02095-AE195054 for ; Mon, 11 Sep 2006 12:42:20 -0400 Received: (qmail 4651 invoked from network); 11 Sep 2006 16:41:02 -0000 Received: from localhost (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 11 Sep 2006 16:41:02 -0000 Message-ID: <450591E5.7080402@zend.com> Date: Mon, 11 Sep 2006 09:42:13 -0700 Organization: Zend Technologies User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: RQuadling@GoogleMail.com CC: dAniel hAhler , internals@lists.php.net References: <015801c6d4d5$6440d1d0$9a02a8c0@pc> <7f3ed2c30609100744x7a5d4fdfs9601ae4671b351d3@mail.gmail.com> <003401c6d4ee$1b251d80$9a02a8c0@pc> <1803358544.20060910173549@marcus-boerger.de> <29.48.46429.82A54054@pb1.pair.com> <10845a340609110106y5a21de3coc98659cde5ef0465@mail.gmail.com> In-Reply-To: <10845a340609110106y5a21de3coc98659cde5ef0465@mail.gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: __autoloading and functions From: stas@zend.com (Stanislav Malyshev) >> Maybe a dump question, but wouldn't it get considered only, AFTER PHP has >> found that the function does not exist? Technically, this can be done - i.e. engine can be patched so that instead of throwing an error or refusing the call it would call appropriate function which would allow for autoloading. However, I think autoloading functions if conceptually wrong. One rarely keeps functions individually separated in different files (while this is routinely happening - and is recommended - for classes). So, if you want to autoload functions you would either have to build complex tables of where each function lives or organize them in some well-defined modules. Such modules are called "classes" in OO-speak, so if you have a group of functions that are united by purpose and you want to autoload - why not to make a class out of them? And if there's just an assortment of unrelated functions - it would probably promote very ugly code if we allow to autoload them individually.