1. Boolean type
The following conditions are all seen as false:
Boolean type false itself
integer value is 0
floating-point value is 0.0
An empty string, and the string "0"
an array that does not contain any elements
objects that do not contain any member variables (PHP 4.0 only)
special type null (including variables that have not been set)
2. Floating point number
Examples of floating point numbers:
$a = 0.23456789022222988;
echo $a; 0.23456789022223 This is the result of the browser's reflection, because the accuracy of the PHP floating-point number is 14 valid digits
3. The difference between single quote ' and double quotation mark ' in string
Case 1:
$i = 90;
$user 1= "hello$i";
$user 2= ' hello$i ';
echo $user 1;
echo $user 2;
You will find: The $user 1 output is:hello90
$user 2 output is:hello$i
Case 2:
$v = "abcd\" ";
$v 2= ' abcd\ ';
Echo ' <br> '. $v;
Echo ' <br> '. $v 2;
You will find: The $v output is:ABCD "
$v 2 output is:abcd\ "
PHP Note 03: Boolean type, string, floating point