Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59504 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 92935 invoked from network); 9 Apr 2012 14:02:53 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 14:02:53 -0000 Authentication-Results: pb1.pair.com header.from=crocodile2u@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=crocodile2u@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.49 as permitted sender) X-PHP-List-Original-Sender: crocodile2u@gmail.com X-Host-Fingerprint: 209.85.216.49 mail-qa0-f49.google.com Received: from [209.85.216.49] ([209.85.216.49:51310] helo=mail-qa0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id DB/37-56433-C0CE28F4 for ; Mon, 09 Apr 2012 10:02:52 -0400 Received: by qafi29 with SMTP id i29so1701870qaf.8 for ; Mon, 09 Apr 2012 07:02:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=6z8TIeBB0ljSr08gnG185sLVU1dtByYhZffD/G5j0+I=; b=WdEtmQRMKvQqmOWDElJKV0TNNsqJgFwUAH/yuG8jnvFdZkcHV8Odp8gbkU/xsxrvw5 Dvu+KBeDKBPPLF4NOA/TXgka7jUyrk7hK8ybY/+y7wtn4bnciVLCzT/Ml0KpESxSXmci +plzNWQmhVJnybHGI+FSAMp0udnih6o9d1xKKOTUDSP6KUJkbr26pahQP7F5eS2mMBMw YvEQSglq9u46SdOD9ibj4TI/3E3iMFQb7SMRfcYzMGJt3kwJWE/sy27sGS+kAU2JbEuh EA6c73M5o51OlXpx59tK2Xq8wEafYer+u/Qg5Exr/CP+8A7t2tAYbegV3qYPPfV042QR K5vw== Received: by 10.224.174.200 with SMTP id u8mr9235004qaz.57.1333980170197; Mon, 09 Apr 2012 07:02:50 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.39.205 with HTTP; Mon, 9 Apr 2012 07:02:24 -0700 (PDT) In-Reply-To: References: <4F82D57F.8020101@gmail.com> <4F82E13A.7010209@developersdesk.com> Date: Mon, 9 Apr 2012 18:02:24 +0400 Message-ID: To: Tom Boutell Cc: Rick WIdmer , internals@lists.php.net Content-Type: multipart/alternative; boundary=20cf30334c952e9ae504bd3f7609 Subject: Re: [PHP-DEV] Re: RFC: source files without opening tag From: crocodile2u@gmail.com (Crocodile) --20cf30334c952e9ae504bd3f7609 Content-Type: text/plain; charset=ISO-8859-1 IDE creators will definitely be excited with this new feature. 2012/4/9 Tom Boutell > On Mon, Apr 9, 2012 at 9:16 AM, Rick WIdmer > wrote: > > > > 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. > > Yeah, you're not the first to say this. require_file and require_code > have both been suggested. I'm fine with either really. > > > I'd prefer a 'start in code mode' optional second parameter to > > include[_once] and require[_once]. > > That would be fine as far as my goals here go, but I'm concerned that > we'll just repeat this discussion if any other options for requiring > things come into being (: > > > 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... > > Sounds like you're basically OK with that bit. > > > 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. > > I'm not opposed to these suggestions. I was trying to keep it > conservative and simple to implement and focus on the case where it > bugs me (creating libraries of class files), but I'd be happy to see a > way for .phpc to be the entry point / frontend controller / standalone > script as well. As you say it must be done with SAPI options (the CLI > included), not hardcoded file extension checking. > > -- > Tom Boutell > P'unk Avenue > 215 755 1330 > punkave.com > window.punkave.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --20cf30334c952e9ae504bd3f7609--