PHP variable names must start with the following symbols: 1. Dollar sign ($) 2. Underscore (_) 3. Backslash (); but cannot start with numbers, punctuation marks, or reserved words.
Symbols at the beginning of PHP variables
In PHP, variable names must start with the following symbols:
$variable_name
. Other valid symbols:
_variable_name
. \\global_variable
. Invalid symbols:
1variable_name
. .variable_name
. echo
, return
. The above is the detailed content of What symbol must a variable start with in php?. For more information, please follow other related articles on the PHP Chinese website!