Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15757 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44535 invoked by uid 1010); 3 Apr 2005 14:24:46 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 44513 invoked from network); 3 Apr 2005 14:24:46 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 3 Apr 2005 14:24:46 -0000 X-Host-Fingerprint: 65.19.190.98 procata.com Linux 2.4/2.6 Received: from ([65.19.190.98:60152] helo=procata.com) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id D0/11-19272-CACFF424 for ; Sun, 03 Apr 2005 10:24:45 -0400 Received: from 65.111.193.246 ([65.111.193.246]) by procata.com for ; Sun, 3 Apr 2005 07:24:35 -0700 In-Reply-To: <5.1.0.14.2.20050403125628.03f83de0@localhost> References: <5.1.0.14.2.20050403125628.03f83de0@localhost> Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: <4079069ce9f9b28f1a53e5acc74173b4@procata.com> Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Sun, 3 Apr 2005 10:24:20 -0400 To: Zeev Suraski X-Mailer: Apple Mail (2.619.2) Subject: Re: [PHP-DEV] __autoload() enhancement From: jeff@procata.com (Jeff Moore) On Apr 3, 2005, at 6:05 AM, Zeev Suraski wrote: > What I'd like to suggest is a change in the behavior of __autoload(), > so that multiple __autoload()'s could be defined. Essentially, > declaring __autoload() would in fact add the function to the list of > functions that are called in case a missing class is referenced. > However, it will not actually place a function named __autoload() in > the PHP function table. That way, it would be possible to declare > multiple __autoloads(), and have all of them called when a missing > class is spotted. Coupled with namespaces, declaring multiple __autoload functions seems natural: namespace x { function __autoload() { } ... } namespace y { function __autoload() { } ... } Absent namespaces, the symbol table manipulation seems a bit magical to me. Just brainstorming here, but why not an __autoload for functions?