Using TAGS in PHP

Asked

Viewed 33 times

1

Use of TAG <?=

On the PHP website, it says is not recommended use this tag syntax. Below is the excerpt.

When PHP interprets a file it looks for the opening tags and closing, which tell PHP to start or stop interpretation of the code between them. Interpretation in this way, allows PHP to be included in various types of documents, as everything that is outside these tags is ignored by the PHP interpreter.

PHP also allows short tag

However, since PHP5.4 this option comes by default enabled in PHP, and remains the same today (PHP7 version).

The real question is, it is still not recommended to use the tag <?= ? If yes, what’s your real problem ?
If not, will the article from the php.net is not out of date ?

There’s this one Question from Stackoverflow that addresses this doubt, however, it is 7 years ago that is probably from the time of PHP5.3.4 (In this version, had to enable the tag option in php.ini).

  • 1
  • Thanks @rray, I had not found this question. I will delete the one I created.

  • @Lucaoa does not need to exclude, it can serve as a reference to another, helping in the research. I closed it as a duplicate because whoever finds yours will have the link to another. The duplicate is a way to increase the chance of people finding what they want, searching for different terms, and at the same time having all the answers centralized.

  • @Bacco I got it. No problem, I will not delete this post.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.