Are short tags *that* bad?

Posted by Col. Shrapnel on Stack Overflow See other posts from Stack Overflow or by Col. Shrapnel
Published on 2010-03-19T11:28:27Z Indexed on 2010/03/19 11:31 UTC
Read the original article Hit count: 362

Filed under:
|

Everyone here on SO says it's bad, for 3 main reasons:

  1. XML is used everywhere
  2. You can't control where your script is going to be run
  3. short tags are going to be removed in PHP6

But let's see closer at them:

Last one is easy - it's just not true.

XML is not really a problem. If you want to use short tags, it won't be a problem for you to write a single tag using PHP echo, <?="<?XML...?>"?>. Anyway, why not to leave such a trifle thing for one's own judgment?

PHP configuration access. Oh yes, the only thing that can be really considered as a reason. Of course in case you plan to spread your code wide. But if you don't?
I think most of scripts being written not for the wide spread, but just for one place. If you can use short tags in that place - why to abandon them? Anyway, it's the only template we are talking about. If you don't like short tags, PHP native template is probably not for you, why not to try Smarty then?

Well, the question is: is there any other real reasons to abandon short tags and make it strict recommendation? Or, as it was said, better to leave short tags alone?

© Stack Overflow or respective owner

Related posts about php

Related posts about shorttags