PHP Short Tags

Absolution

New Member
I use short tags in my code often because they are quite convenient. However it seems that the developers of PHP don't really like them and are considering removing them. Here is a good discussion on the matter:

http://stackoverflow.com/questions/200640/are-php-short-tags-acceptable-to-use

For purely philosophical reasons I try to obey strict xhtml when I format webpages. But I am unsure of the major philosophy behind short tag removal. Does anyone here have any opinions on the subject?
 

DHDdirect

New Member
I'm pretty sure I have read that ages ago.

Never really made much since to me anyway, it's not like it's short hand that spans throughout the whole spectrum of code so you are only talking a handful of bits worth of data saved anyway.

So in other words it's pointless, hence it's eventual removal.
 

Absolution

New Member
I'm pretty sure I have read that ages ago.

Never really made much since to me anyway, it's not like it's short hand that spans throughout the whole spectrum of code so you are only talking a handful of bits worth of data saved anyway.

So in other words it's pointless, hence it's eventual removal.

True, philosophically it tends to be better to get things done with a simple set of tools in combination, rather than a complex set of tools. Especially if the added tool yields no new information.
 

MarkR

New Member
If you've ever ported a website from a host that allows them to a host that does not then you realise the faff involved when making the website compliant.

It's safer just to use <?php just to be sure, 3 characters for the sake of compliance!
 

Absolution

New Member
Thanks for your comments! Philosophically they dont seem needed in the programming code. I think in the future I will do without them.
 

n1c0_ds

New Member
It's mostly because of portability issues. I don't use them, but they are really useful for inline PHP since it maintains readability.
 

MarkR

New Member
The worst part is if short tags are disabled on a configuration where they were previously allowed the server will sometimes output the script to the user as plain text. Never an ideal scenario.
 

Absolution

New Member
The worst part is if short tags are disabled on a configuration where they were previously allowed the server will sometimes output the script to the user as plain text. Never an ideal scenario.

I noticed that when I installed PHP on an apache server, definitely not a secure situation!
 
Top