On Sun, Apr 15, 2012 at 7:21 AM, Jannik Zschiesche <he...@apfelbox.net>wrote:

>
> Am 15.04.2012 08:20, schrieb John LeSueur:
>
>  Since you're looking for input, specifically on the compromise, let's try
>> to figure out what's possible. The RFC proposes .phpp files that can only
>> include other .phpp files. Others want .phpp files that can include .php
>> files. There are two ways I can think of to accomplish this.
>>
>> 1. an ini switch. This is a bad idea, because it causes code written under
>> one setting to be impossible to use in the other setting.
>> 2. 3 file types.<?php,<?phpp,<?php~p (read:<?php almost pure) We'd need
>> something better than that last one, but what it means is that _this_ file
>> is pure php, but it may include an embedded script somewhere.
>>
>> Between those two options, I would choose 2. Just to be clear, if I had a
>> third choice, which was to make no change, it would be #3.
>>
>> The second thing that still needs nailing down as far as implementation is
>> how to determine parsing mode. If it has to be specified at include time,
>> then we're putting the burden on whoever writes the autoloader to know
>> what
>> kind of file it is. If it has to be specified in php.ini, or in the sapi
>> configuration, then I'm putting the burden on the administrator. I want to
>> allow the developer who writes the file to specify its parsing mode.
>>
>> The two ways I see for developers to do so is to use variations on the
>> <?php header of the file, or by file extension. I prefer variations on the
>> <?php header, because file extension still depends on configuration in
>> order to work, so involves admins in the decision of how to parse the php
>> files that I write.
>>
>> <?php means just what it does now.
>> <?phpp means, disallow ?>, and error if there is anything before the
>> header. The RFC specifies an additional restriction, throw error if I
>> include file with<?php header.
>> <?phpo (open to suggestions for the text of this header) means disallow
>> ?>,
>> and error if there is anything before the header.
>>
>> John
>>
>
> Hi,
>
> I normally only read the discussions, instead of participate but I have a
> short question about #2:
> What is, if you mix the specified open tags?
>
> Look at this file:
>
> --- test.php
> <?php
>
> /* ...snip... */
>
> ?>
>
> ...snip...
>
> <?phpp
>
> /* ...snip... */
> --- EOF
>
>
> Would this error out? Would this be ignored?
> (not that this kind of file should be written like this, but
> theoretically, it is possible)
>
> Cheers,
> Jannik
>
>
>
This would error out. If anything appears before <?phpp, it's a parse error.

Reply via email to