Any disadvantages with short opening tag in PHP ?
Hi Lakshanj,
One of the advantages of coding PHP with the use of short opening tags is a easier and faster method compared to writing code in the standard opening tags. This is true of course when you create a template that will be used often.
The disadvantage of using this method of coding is that first you have to make sure that short_open_tags had been enabled by you or your web hosting provider. If your short_open_tags had been disabled then your application won't work and you will have a number of security issues because of this.
This is because when short_open_tags has been disabled only standard opening tags will be recognized. If your aim is to create PHP applications that will be accessed by a lot of people it is not recommended to make use of short opening tags. Even in PHP manuals it is not advisable to use short opening tags.
Any disadvantages with short opening tag in PHP ?
The disadvantage of using short tags is that it is not allowed in some host and hence your code will be incompatible in all those servers. For the same reason, using short tags is not the best practice. Short tags are not part of coding specification.
In the php.ini-production file provided with PHP 5.3.0, they are disabled by default.
So, using them in an application you want to distribute might fail.
Any disadvantages with short opening tag in PHP ?