On Apr 7, 2012, at 15:26, Tom Boutell <[email protected]> wrote: > * If the CLI sees a .phpc file extension, the parser starts out in PHP > mode (no opening <?php is required). It is still possible to shift > into HTML mode after that with ?>. > > * If a require/include statement sees a .phpc file extension, the > parser starts out in PHP mode.
I don't think such magic is good. It will rather confuse people. Back when I thought about this my best idea was a flag to include/require which at some point will emit a notice if not set and where in the long run the default changes. But I dropped the idea. Reasons include the fact that the whole environment is being forced to change (IDEs, code checkers, ...) and well most people not only have to type the opening tag but also some file header (license, phpdoc, ...) which makes the benefit smaller. And then there's another thought: The <?php makes it trivial to identify PHP code as such, especially when discussing snippets or such. My conclusion is that I can see reasons to change this, while in my opinion it's not worth it. johannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
