Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:45992 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45844 invoked from network); 10 Nov 2009 16:45:25 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 10 Nov 2009 16:45:25 -0000 Authentication-Results: pb1.pair.com smtp.mail=mls@pooteeweet.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=mls@pooteeweet.org; 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:45281] helo=bigtime.backendmedia.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/01-38546-4A899FA4 for ; Tue, 10 Nov 2009 11:45:25 -0500 Received: from localhost (unknown [127.0.0.1]) by bigtime.backendmedia.com (Postfix) with ESMTP id F27D21EBC01D for ; Tue, 10 Nov 2009 16:45:28 +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 hMxopf5VPPOt for ; Tue, 10 Nov 2009 17:45:28 +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 27A434144009 for ; Tue, 10 Nov 2009 17:45:27 +0100 (CET) Content-Type: text/plain; charset=windows-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Date: Tue, 10 Nov 2009 17:45:20 +0100 Message-ID: <413588E2-8AC8-49F7-B7BF-97BEFB0A71E4@pooteeweet.org> To: PHP Developers Mailing List Mime-Version: 1.0 (Apple Message framework v1076) X-Mailer: Apple Mail (2.1076) Subject: alternative to the fopen() hack in autoloaders From: mls@pooteeweet.org (Lukas Kahwe Smith) Ahoi, I have written an RFC for a more efficient solution to get rid of the =20= common fopen() hack inside autoloaders: if ($fp =3D @fopen($file, 'r', true)) { fclose($fp); include $file; } Here is the gist of the proposal: In order to solve the above issues this RFC proposes the addition of a =20= new construct/function for now called =93autoload_include=94 for lack of = a =20 better name that largely behaves like the =93include=94 does today with =20= the following differences, that when the include failed because of a =20 missing file no warning is raised and php null is returned. Further details can be found on the wiki: http://wiki.php.net/rfc/autoload_include As stated in the RFC, I am not happy with the name "autoload_include". =20= Suggestions welcome! regards, Lukas Kahwe Smith mls@pooteeweet.org