The so-called identifier refers to the name of the variable.
The names of functions and classes are also identifiers.
PHP rules about identifiers:
Identifiers can be letters, numbers, underscores of any length, and must not start with a number.
Identifiers in PHP are case-sensitive, but function names are an exception.
The variable name can be the same as the function name. But it should be avoided as much as possible.
You cannot create a function with the same name as an existing function.
short tags are only used to output variables or expressions. The general usage is
<?=$a?> <?=(表达式)?>
which is equivalent to
<?php echo $a?> <?php echo (表达式)?>
does not support Such as if, for and other structures.
If you write
<?if(...?>
, it will become
<!--if(...-->
, so when writing a program, you must use long tags and insert the output into the html Short markers are sometimes used.
The above is the detailed content of The difference between the short tag ?> and the long tag in PHP. For more information, please follow other related articles on the PHP Chinese website!