About variables:
variable type : 1.int shaping is also an integer negative number can be
2.boolean True and False
3.double Exact decimal
4.string string ' Wrap up
5.NULL NULL
6.array Array,
7.object objects
GetType
Variable types can be detected with GetType, Syntax: GetType ($ variable name)
To determine the variable type :
Settype (), Is_array (), Is_bool (), is_float (), Is_integer (), is_null (), is_numeric (), is _object (), Is_resource (), is_scalar () and is_string ()
Print Variables :
echo More for strings
Print_r () Multiple for arrays
Var_dump ()
Variable type conversions
conversion from string to number : From left to right, until the illegal number (English letter) stops, the interception portion is converted to the number int type,
Example: $a = ' 15helloworld ';
$a = $a +3;
echo $a;
This result is (int type)
conversion from a number to a string : with. Direct stitching
Destroying variables
Syntax: unset ($a);
Note : $a = $b, $a still exist after destroying $b! $a = & $b together point to the same address, which is mutual
Dynamic variables
Example: $a = 5;
$b = ' a ';
echo $ $b; Will show 5
Study PHP-02