Home > Article > Backend Development > Briefly describe what php tags are
##bb9bd6d87db7f8730c53cb084e6b4d2d is the parser (long tag) of PHP. All code that needs to be run must be placed in the parser.
<?php echo "hello world"; ?>
Short tagb26da186e11666e6dd99f28d6205715c72637aecae1027e7d023ac098a170986 (Recommended learning: PHP Programming from Beginner to Master)
Short tags are only used to output variables or expressions. The general usage is
<?=$a?> <?=(表达式)?>, which is equivalent to
<?php echo $a?> <?php echo (表达式)?>. It does not support structures such as if and for. If you write
<?if(...?>, it will become
<!--if(...-->. Open the short tag. Open the short tag in PHP.INI: short_open_tag = On, PHP default tag character < ;?php ?>
So you must use long tags when writing programs, and short tags will be used when inserting output into html.
The above is the detailed content of Briefly describe what php tags are. For more information, please follow other related articles on the PHP Chinese website!