Weird but in the last week 2 different people complained about the short_open_tags.
This is the thread on github:
wthielen commented 4 hours ago:
Using short open tags for your PHP code is considered bad practice, as it causes problems when opening for example XML files (which start with <?xml) on the same Apache server with short_open_tags enabled. So it is best practice to disable short_open_tags, and go with <?php for all your PHP code. Similarly, stop being lazy and type “<?php echo” instead of “<?=” (although you’ll be happy to hear that PHP 5.4 will support “<?=” even with short_open_tags disabled: http://www.php.net/manual/en/migration54.new-features.php).
My reply:
Using short open tags for your PHP code is considered bad practice,
Maybe for you, not for me and other many people. Your decision I respect it I do not follow it.
opening for example XML files
Never had that issue, when I open XML I use simplexml_load_file and no problem, not sure how you do it :S, maybe in the past that did happen, we do not allow to install in < 5.3 version.
stop being lazy and type
What are you serious? I am lazy because I follow a coding standard? really? Even Rasmus Lerdorf endorses the uses of this. Watch any php conference video… Even he didn’t endorse it for me personally is a matter of code readability. Having <? echo “some”; ?> doesn’t add any extra value to my code. Neither <?=’some’?> but at least is shorter and I understand the same.So yes I like PHP short tag. NOTE PSR-1 accepts both https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-1-basic-coding-standard.md
PHP 5.4 will support “<?=”
Of course supports it! and any decent hosting has it enabled. Only in the last 2 years found a hosting with them disabled and their argument was similar to yours (and I have tested literally hundreds from all the world):
A Canadian hosting company said to us:
It must be a very, very old piece of software. We use PHP v5.4 here (as most hosts do) so it would probably have other problems as well. PHP “short tags” are an old disused method of sloppy shorthand for programmers too lazy to type “
Of course they didn’t use 5.4 they were using on my client (said previously from them)
PHP 5.3.27 – the latest!
First they lie to her with the version of PHP and been the latest (yes the latest from branch 5.3.X) and they had short tags disabled, and they didn’t enable them for her, so she left.
Hope this makes it all more clear for you.
Thanks once more for contributing, anything helps.
Regards