What is the difference between the PHP open tags “

They are shorthand of <?php echo .... ?> known as short tags. You should avoid using them because:

  • They seem to be turned off on some servers
  • They can get you in trouble in terms of security
  • They can create conflict with processing instructions like <?xml ... ?>

Therefore you should never use them again, also have a look at:

PHP Short Open Tag: Convenient Shortcut or Short Changing Security?

Leave a Comment