Does anyone knows why PHP uses '<?php' instead of '<%'

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

josh
DevNet Master
Posts: 4872
Joined: Wed Feb 11, 2004 3:23 pm
Location: Palm beach, Florida

Post by josh »

So <? and <?= will still remain available..


personally I don't see any evidence towards removing it. The popular argument against their use seems to be code portability, well if they disable it even more code will become incompatable with PHP6
Roja
Tutorials Group
Posts: 2692
Joined: Sun Jan 04, 2004 10:30 pm

Post by Roja »

jshpro2 wrote:So <? and <?= will still remain available..
Correct.
jshpro2 wrote:personally I don't see any evidence towards removing it. The popular argument against their use seems to be code portability, well if they disable it even more code will become incompatable with PHP6
The argument is that some servers have disabled it, so using it makes your code less portable. Thats reasonable and accurate.

The reason for removing it is the same reason for removing many of the deprecated features in PHP: To reduce confusion and the potential for non-portability. By making a single choice, they make PHP faster, easier to support, and more consistent - which really helps newcomers.

There is a point, however, at which the pain of the change (incompatibility) is greater than the benefit, and short tags is definitely (imho) FAR more pain than benefit.

But ask me about some of the other decisions for PHP6, and you'll get a different answer. :)
Post Reply