Re: [RFC] Namespace and Parse tags on Include and Require

From: Date: Tue, 06 Mar 2012 22:03:28 +0000
Subject: Re: [RFC] Namespace and Parse tags on Include and Require
References: 1  Groups: php.internals 
Request: Send a blank email to internals+get-58691@lists.php.net to get a copy of this message
On 06/03/12 15:45, Michael Morris wrote: > I have made a wiki account with user name MichaelMorris - I don't > think I have permissions to submit an RFC as of yet. I'll post this > here for now. I've brought this up before, but can now simplify the > original proposal since the decision to always have <?= available > addresses much of the original problem. > > These changes apply to include, require, include_once and > require_once. Two new arguments for these functions are proposed for > introduction. > > (...) > > Problems > The largest problem is with IDE's. There is no current convention to > warn them that the file is pure PHP. However, I think this can be > mitigated by adopting an extension for php include files -- *.pif, > *.iphp are two possibilities. The language itself doesn't need to > give a care about this directly. Tagless files interpreted as php is the wrong way to go. I think you should instead propose it as: * A file included in that mode MUST begin with <?php. * ?> is forbidden in such mode unless followed by EOF.

« previous php.internals (#58691) next »