echo "Hello", "AAAA";//output syntax, multiple strings can be output
print "World"; can be output, can only output a string with "." Splicing can be output, with "," Splicing direct error
Data type Int,double,float,string,char,datetime,bool
PHP Weak type language
Variable definition 1. No add type required; 2. Start with $
all variables in PHP start with the $ sign
Variable variable
$a = 5;
echo isset ($a);//Determine if the variable is defined; 0 or null in PHP means false
unset ($a);//Clear variable
Empty ($a);//Determine if the variable is an empty array
$b =& $a; & Take Address
$a = 5;
Var_dump ($a);//Output variable details
$b = (string) $a;//Type conversion
Var_dump ($b);
. is stitching (stitching string)
The "/" default string, so the integer in addition to the integer automatically converted to a string, the result appears decimal, need attention
"A +"
echo $a;//error suppressor, can block hint error
echo 5==5? " Male ":" NV "//Three mesh operator
PHP Basics-1