Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:59526 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 48445 invoked from network); 9 Apr 2012 18:23:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Apr 2012 18:23:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=chrisstocktonaz@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=chrisstocktonaz@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.170 as permitted sender) X-PHP-List-Original-Sender: chrisstocktonaz@gmail.com X-Host-Fingerprint: 209.85.210.170 mail-iy0-f170.google.com Received: from [209.85.210.170] ([209.85.210.170:33692] helo=mail-iy0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4C/03-34074-719238F4 for ; Mon, 09 Apr 2012 14:23:19 -0400 Received: by iaeh11 with SMTP id h11so7391537iae.29 for ; Mon, 09 Apr 2012 11:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=H2eHZ9wmDu5zi2v3fq2SpUX2j/GRBRymiAaaE0WlKWA=; b=eSZKnSCfCkA2ICibpASHOCqgp+KhRPFgSfdtCyqCiyeaSf+uqoNkhFiqZE8Wx8fFuR kvjDh3D7GAG19l5ZlpB/ireu2Xt2/D0AkOz1i50cQfTMkcHscwm47oobbdd1aQlRVgvF Qow/NWmhqqiFWEDYEttIdoWOwG9ZdHYQSTtc1qseCaGPtSVhMRAPAJaZAFuAaUDd9e+x VT6fFXpSLcMqm7uL0P9W8MA1dB4kdFiZ1se5XW5OU+Yk4hZLMjeh1QMGxNu5yIeORTmB 8Y87YZClTMp132+2AAwskRv61BPeZrag1ew68OAhSX7nJMr3L9/dlsABGGt4aDmPxCLz C6yQ== MIME-Version: 1.0 Received: by 10.50.192.168 with SMTP id hh8mr37164igc.13.1333995797003; Mon, 09 Apr 2012 11:23:17 -0700 (PDT) Received: by 10.42.174.9 with HTTP; Mon, 9 Apr 2012 11:23:16 -0700 (PDT) In-Reply-To: <4F831FAE.2030208@ralphschindler.com> References: <-5877502932356715576@unknownmsgid> <-3647345967307864634@unknownmsgid> <4F831FAE.2030208@ralphschindler.com> Date: Mon, 9 Apr 2012 11:23:16 -0700 Message-ID: To: Ralph Schindler Cc: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] RFC: source files without opening tag From: chrisstocktonaz@gmail.com (Chris Stockton) Hello, On Mon, Apr 9, 2012 at 10:43 AM, Ralph Schindler wrote: > Hey Tom, > > An idea, why not overload require/include with a second parameter that > simply enforces an include mode. =A0For example > > // in some autoloader (include, requires, and *_onces) > include $pathToFile, INCLUDE_MODE_PHP_ONLY; > > This would tell the parser/executor to start in PHP mode and never leave = it, > that way, ending tags would throw a runtime/execution error. > > Other constants and behaviors could be: > > =A0INCLUDE_MODE_PHP_START; > =A0INCLUDE_MODE_PASSTRHOUGH_START; (the current and default behavior) > > This would have the least amount of impact on BC, and seeminlyg would be = a > friendly change to the lexer/syntax. > > Thoughts? > > -ralph > > Although I am not very interested in this feature, if it is implemented I like the idea of flags instead of introducing new keywords. Maintaining backwards compatibility would be great considering the benefit to the feature to be completely honest (and in disagreement to many people, but I do understand the reasoning for everyone's interest in it) is extremely minor in my eyes. In addition I would suggest maybe using PHP_INCLUDE_* as a place for these constants to live. -Chris