Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59502 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84699 invoked from network); 9 Apr 2012 13:16:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 13:16:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=vchkpw@developersdesk.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=vchkpw@developersdesk.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain developersdesk.com designates 204.228.229.4 as permitted sender) X-PHP-List-Original-Sender: vchkpw@developersdesk.com X-Host-Fingerprint: 204.228.229.4 lessa.developersdesk.com Received: from [204.228.229.4] ([204.228.229.4:59484] helo=mail.developersdesk.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 39/85-56433-331E28F4 for ; Mon, 09 Apr 2012 09:16:37 -0400 Received: (qmail 10496 invoked by uid 89); 9 Apr 2012 13:16:32 -0000 Received: from unknown (HELO ?10.1.1.5?) (vchkpw@developersdesk.com@67.61.98.111) by 0 with ESMTPA; 9 Apr 2012 13:16:32 -0000 Message-ID: <4F82E13A.7010209@developersdesk.com> Date: Mon, 09 Apr 2012 07:16:42 -0600 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: internals@lists.php.net References: <4F82D57F.8020101@gmail.com> In-Reply-To: <4F82D57F.8020101@gmail.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: RFC: source files without opening tag From: vchkpw@developersdesk.com (Rick WIdmer) Option 1: Introduce require_path I think require_code is a better name. Parm 1 isn't a path, it is a file, so require_path seems wrong to me. I'd prefer a 'start in code mode' optional second parameter to include[_once] and require[_once]. Option 2: Filename Convention The PHP engine should not know or care what the file extension is. I won't object if you can convince autoloader authors to follow the .phpc convention. Personally, once I can count on this feature, every file I include/require will probably be written starting in code mode and using the new calling convention. Even when I use PHP to create page templates... Additional suggestions: Add an option so the CLI can start in code mode too. Add another Handler to the Apache SAPI, maybe application/x-httpd-php-code similar to x-httpd-php and x-httpd-php-source, so we can configure Apache to start arbitrary file extensions with code mode on. This defers setting the action for various file extensions to the person configuring the web server. Other web server SAPIs will need similar treatment, but I'll leave them to someone with personal experience.