Re: short_open_tag

From: Date: Sun, 23 Mar 2008 02:43:23 +0000
Subject: Re: short_open_tag
References: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  Groups: php.internals 
Request: Send a blank email to internals+get-36358@lists.php.net to get a copy of this message
Stanislav Malyshev wrote:
I see your point... but wouldn't it be better not to need that? Johannes' idea seemed good to me, always assuming it's do-able.
Well, yes, it would indeed, but we have a lot of <?= templates now so either we allow <?= on no-short-tags (if XML guys out there will be OK with it I might be OK too, as IMO no valid XML would have <?=) or invent some other syntax - in which case a) it probably would be worse than <?= since you hardly can get shorter and "opening tag + =" is kind-of de-facto standard for such things by now and b) it's take time to educate people to use new syntax, especially that unlike <?= it won't work on PHP < 5.3 so people would stay away from it for a couple of years (heck, people still use PHP 4 out there! not talking about 5.0). So we have this: 1. Leave it as is and be in World of Configuration Pain (TM) 2. Allow <?= independent of short tags (my +1, dunno about XML templates guys)
I'd be ok with that too. It's not a valid PI tag, as far as I know, but I don't think that is a problem. One interesting observation is that there was a slight BC break related to short tags between PHP 4 and 5 that I hadn't noticed before. <?= /* 123 */ ?> Works in PHP4 but results in a syntax error in PHP 5. -Rasmus

« previous php.internals (#36358) next »