What PHP tags are always available?

Of the 4 types of PHP tags:

  • Standard tag:<?php ...?>
  • Short tag:<? .... ?>
  • Script :<script language="php"> ... </script>
  • ASP :<% ... %>

Is it always available

+3
source share
4 answers

Standard tags <?phpand <script>always available.

Both others depend on configuration settings.

From the link :

, PHP. <?php ?> <script language="php"> </script> . - ASP, php.ini. , ASP , .

, short_open_tag php.ini PHP --enable short-tags.

ASP , asp_tags php.ini.

+5

PHP <?php ?>.

PHP, (<? + ?>) php.ini, <?php ?> .

+5

So far I know that PHP short open tag will be completed, deprecated since PHP 6. So this is a beast to use.

+1
source

You must use a tag <?php. You can use the tag <?when the "short open tag" property is "On" in your php.ini file.

0
source

Source: https://habr.com/ru/post/1754778/


All Articles