PHP echo vs PHP short tags
Are they equal in safeness? I was informed that using
was less safe, and that it slows down page load times. I am strictly biased to using echo.
What are the advantages/disadvantages?
So why don't they just remove the option to turn off short open tag and let it be enabled by default.
This is a VERY dangerous move by PHP. The reason being, if you put your existing code that has short tags in it on a PHP6 server and someone views that page, they will get the raw code downloaded to their browser which you can view. This could seriously kill off PHP.
Starting with PHP 5.4, short echo tag is always recognized and valid, regardless of the
short_open_tag Off or On doesn't matter anymore.
So now you can, without concern, put tags like this in your templates:
<?= (($test) ? "val1" : "val2") ?>
It is official now, the "short echo tag" is something very different than the "short tag".