When php parse a file,it looks for opening and closing tag.php parser interpreting the code between opening and closing tag and allows php to be embedded in all shorts of different documents.Outside of opening and closing tag is ignored by the php parser.
Now php recommended you to use only two tags.
1.Standard tag which is <?php echo "I'm Standard tag"; ?>
2.Short echo tag which is <?= "I'm Short echo tag"; ?>
Both are not affected by php ini configuration file directive.
Although php also allow short open tag which is discoursed but still available if php was configured with --enable-short-tags or short_open_tag is enabled in php ini configuration file directive.
if you want to use php in combination with xml,you can disable short_open_tag in order to use <?xml ?> inline.
Otherwise, you can print it with PHP, for example: <?php echo '<?xml version="1.0"?>'; ?>
short_echo_tag also affected the short echo tag before 5.4.0
since 5.4.0,short echo tag is always available.
asp tag <% %> and <%= > are removed from php 7
script tag <script language="php"> <script/> also removed from php 7
It is preferable to omit the closing tag if a file only contain the php code.
<?php echo "a statement";
echo "another statement";
It prevent unwanted whitespace or new line being added after the closing tag.
--happy-gazi|php-