There are four different pairs of opening and closing tags which can be used in php. Two of those, <?php ?> and <script language="php"> </script>, are always available. The other two are short tags and ASP style tags, and can be turned on and off from the php.ini configuration file. As such, while some people find short tags and ASP style tags convenient, they are less portable, and generally not recommended.
Also, I believe the plan is to not even have the short_open_tag option available at all in PHP 6, so in addition to the other good reasons to avoid "<?" and "<?=", forward compatibility is another reason.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Oops. I misremembered how to code the PHP script tag. For some reason I thought it was similar to an HTML script tag and of course HTML script tags don't have a language attribute. I wonder why they didn't make the PHP script tag similar to the HTML one?
Oops. I misremembered how to code the PHP script tag. For some reason I thought it was similar to an HTML script tag and of course HTML script tags don't have a language attribute. I wonder why they didn't make the PHP script tag similar to the HTML one?
I figured you were diligently trying to write valid, strict [X]HTML.
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation
Bookmarks