Hello Stanislav,

  thanks for rewriting this.

Friday, March 21, 2008, 6:57:40 PM, you wrote:

> Hi!

> Forwarding this mail again since apparently many people missed it 
> previously. Please discuss.

> -------- Original Message --------
> Subject: short_open_tag
> Date: Fri, 07 Mar 2008 12:45:59 -0800
> From: Stanislav Malyshev <[EMAIL PROTECTED]>

> Hi!

> I wonder - is there a reason why short_open_tag config value is per-dir
> and not PHP_INI_ALL? After all, as I understand, it is private for each
> compilation. So suppose you preferred it generally off (you do XML,
> etc.) but you have some files in your app where you want it on - would
> there be any problem anywhere if it were INI_ALL?

For me the largest issue is infact late enabling of short tags at run time.
The issue tracks down to the issue where peole might use code that enables
short open tags but forgets to disable that. Now why might I rely on short
open tags being disabled is another question of course. Years ago when we
last discussed whether we should discourage them the conclusion was that
not many people rely on them being off. Today many people have php code
interact with XML code which sees short open tags as invalid PIs. Thus we
should try to discourage maybe even finally deprecate short open tags. This
would also be in line with the rest of PHP where we block and discourage
short syntactical sugar when all it does is saving keystrokes. With short
open tags the argument usually simply is that '<?=$bla?>' is shorther than
writing '<?php echo $bla:?>'. But then again the former is much harder to
spot in manual written code. And for generated code it doesn't matter at
all. That said I am against short open tags. And given my first part. I do
not want to deal with code that does 'php_ini_set("short_open_tags", 0);'
after every single include or require statement.

Best regards,
 Marcus


-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to