getkirby-v2 / starterkit

This is the deprecated starterkit for Kirby v2.
http://getkirby.com
Other
301 stars 94 forks source link

Recommend options? short_open_tag #51

Closed rugk closed 9 years ago

rugk commented 9 years ago
# php_flag short_open_tag on

This is something which I would clearly call not recommend. Short open tags are never recommend. They are bad practise, so please don't recommend this there.

I also see no reason why it would be recommend for Kirby.

Some links for more information:

lukasbestle commented 9 years ago

This is why the Kirby documentation uses "long tags" wherever possible. Also, no short open tags are used in the Kirby code base.

The reason for the "recommendation" (meaning: fully optional option) is that Kirby also supports PHP 5.3, which didn't support <?= when short open tags are disabled. But since this is a very useful feature, Kirby offers to enable short open tags.

But you are right: We could probably remove this line from the .htaccess now that PHP 5.3 is so old.

zzzzBov commented 9 years ago

Relevant: http://programmers.stackexchange.com/a/151694/7865

JimmyRittenborg commented 9 years ago

I like my short tags :+1:

rugk commented 9 years ago

<?= is completely fine of course. However I cannot find it anywhere in the source.

lukasbestle commented 9 years ago

However I cannot find it anywhere in the source.

Yes, exactly. Because Kirby is and (still) needs to be compatible with PHP 5.3 without short open tags enabled. But that doesn't mean that you can't use it in your templates. ;)

bastianallgeier commented 9 years ago

I removed the recommendation from the htaccess file and also changed the min required PHP version to 5.4. There's no sense to support 5.3 any more.