Php Basics-constant-basic functions related to variables. Php Basics-constant-variable-related basic function annotation statement line # single line * multi-line comment *** document comment ** constant-defined custom Constant name case-sensitive system php Basics -constant-basic functions related to variables
Comment statement
// Single row
# Single row
/*
Multi-line comment
*/
/**
* Document comment
*
*/
Constant definition
Custom constant name case sensitive
The magic constant of the system is case insensitive _ DIR _ dir __
Variable definition
Variable names are case sensitive
The variable name must start with the $ symbol and comply with the naming rules of the variable name.
$ I;
Var_dump ($ I );
$ I = 'OK ';
Var_dump ($ I );
$ I = "Hello ";
Var_dump ($ I );
$ I = 20;
Var_dump ($ I );
USD I = 20.5;
Var_dump ($ I );
// The variable type is similar to the javascript variable type and is a variant type.
$ I = true;
Var_dump ($ I );
The function name and class name are case-insensitive.
Basic php functions
Phpinfo ();
Var_dump ($ I );
Echo gettype ($ I );
Define ('age', 200 );
Defined ('age ');
Realpath ()
Dirname ();
Comment statement // Single line # single line/* multi-line comment * // *** document comment **/constant definition custom Constant name case sensitive system...