Home > Article > Backend Development > What symbols are used for php language markup?
The symbols of the php language tag are: 1. , the end tag of the code, used to identify The end of the PHP code; 3. , a short tag, used to identify the following code as PHP code; 4. = expression ?>, a short output tag, used to directly output the value of the expression; 5. , long comment tags, used to comment out code blocks.
The operating environment of this article: Windows 10 system, PHP8.1.3 version, Dell G3 computer.
The symbols used in PHP language tags are as follows:
?>: This is the end tag of PHP code, used to identify the end of PHP code. In PHP code, this tag can be omitted if there is no subsequent HTML or other non-PHP code.
= expression ?>: This is PHP's short output tag, used to directly output the value of an expression. Equivalent to the simplified form of .
: This is PHP's long comment tag, used to comment out code blocks. Code within this comment block will not be parsed or executed.
It should be noted that in order to avoid code portability problems, it is recommended to use standard PHP tags such as . Avoid using the short tag, as this tag may be disabled in some PHP configurations. In addition, be careful to avoid using HTML comment tags in PHP code, because comments in PHP code should use PHP comment tags such as /* */ or //.
The above is the detailed content of What symbols are used for php language markup?. For more information, please follow other related articles on the PHP Chinese website!