Re: Re: Disabling PHP tags by php.ini and CLI options
| From: | Yasuo Ohgaki | Date: | Thu, 12 Apr 2012 01:51:40 +0000 |
| Subject: | Re: Re: Disabling PHP tags by php.ini and CLI options | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-59773@lists.php.net to get a copy of this message | ||
Hi,
2012/4/12 Rasmus Lerdorf <rasmus@lerdorf.com>:
> On 04/11/2012 02:10 PM, Yasuo Ohgaki wrote:
>> It's also very easy to write backward compatible code also.
>> The 3 lines of changes to adopt this RFC do not bother
>> old PHP.
>>
>> No compatibility issue for existing code
>> Just 3 lines of change to adopt
>> Full backward compatibility for OLD systems
>>
>> The only issue is NEW code may be disclosed by **OLD**
>> systems.
>>
>> If you think it costs too much still, please let me know.
>
> Pretty much all of the code I have ever written would break. I use
> PHP-based templating everywhere and include my templates with
> include/require. How exactly can I fix this with 3 lines of code?
>
I guess you have been writing code for the best performance.
I have these code also. For these codes, there are many places
to change, so it can't be adopt template_mode=off easily.
The best way would be defining your own include/require wrapped
by ini_set('template_mode', 'on') and ini_set('template_mode',
'off');
Then replace include/require where it is needed.
Users may stay template_mode=on. The best part of PHP is
templating, so this switch should be in PHP forever. This switch
is to enjoy best of both embedded and non-embedded language
at the same time. PHP without template is not PHP.
I would rather not to have new parameters nor special extensions
for PHP only script. This RFC is the best I can think of now.
Regards,
--
Yasuo Ohgaki
yohgaki@ohgaki.net