Re: RFC: source files without opening tag
| From: | Luke Scott | Date: | Mon, 09 Apr 2012 21:38:15 +0000 |
| Subject: | Re: RFC: source files without opening tag | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59564@lists.php.net to get a copy of this message | ||
> Obviously, it would need to be at the top of the PHP file (whitespace
> notwithstanding). Since we don't want any BC breaks, we at very least need
> it to start with "<?" so that we don't end up parsing anything that
> wasn't
> mean to be parsed. So how about we keep it simple and just use a single,
> "<?phpp" at the beginning of the file? No ?> would be allowed after that.
> Anything before that (in the file itself) would also be ignored and throw a
> warning.
Remember, <?xml tags. I think <? By itself was deprecated for this reason.
> This sounds like the best approach, given the limitations involved with
> webserver configurations. I'm still very much against though allowing ?>
> within one of these files (included or otherwise), as it really defeats the
> whole purpose and would just encourage poor architecture without any
> countervailing benefit.
Agreed. Disallowing ?> in a file in pure code means only one <?php tag
at the top.
A flag on require/include is acceptable to me, as long as the default
mode is configurable in the php.ini file (when none are specified).
Luke
>
> --Kris