In addition to the following code, but also to say a float, float is approximate number, such as in Java or JS, 0.1 add 10 times, the result is 1.0000001, not 1.
<?php/** * Variable Type * Boolean Boolean * Incidentally introduce scientific notation */$bool = true; $bool 2 = false; $bool 3 = 0; Printing results: Int (0)---false $bool 4 = 0.0; Printing results: Float (0)---false $bool 5 = 0.00; Printing results: Float (0)---false $bool 6 = ""; Print Result: string (0) ""---false $bool 7 = ""; Printed Result: string (1) ""---true $bool 8 = "0"; Printed Result: string (1) "0"---false $bool 9 = "0.0"; Printed Result: string (3) "0.0"---true $bool 10 = "0.00"; Printed Result: string (4) "0.00"---true $bool one = Array (); Print Result: Array (0) {}---false $bool = array (0); Print Result: Array (1) {[0]=> int (0)}---True $bool = new Iwanghang; Print Result: Object (Iwanghang) #1 (0) {}---True class iwanghang{} $bool = ord ("Hello World"); Print Result: Int (104)---True, the Ord () function returns the ASCII value of the first character of the string. $bool = 1.2e3; Printing results: Float (10)---true, equivalent to 1.2* (3 square) $bool = 7e-10+1; Printing results: Float (1.0000000007)---true, equivalent to 7* (10 of 10) plus 1 $bool = 3E+5; Printing results: Float (300000)---true, equivalent to 7* (10 of 10) $bool 18 = 0.00000000006; Float (6.0E-11)---true $bool = 3E-3; Float (0.003)---true, digital small can be normal display 0.003, $bool 16 is too long, if not add 1 will show scientific counting method Var_dump ($bool); Print Result: BOOL (TRUE) echo "<br>"; Var_dump ($bool 2); Print Result: bool (false) echo "<br>"; Var_dump ($bool 3); Printing results: Int (0)---False if ($bool 3) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 4); Printing results: Float (0)---False if ($bool 4) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 5); Printing results: Float (0)---False if ($bool 5) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 6); Print Result: string (0) ""---false if ($bool 6) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 7); Print Result: string (1) ""---true if ($bool 7) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 8); Printed Result: string (1) "0"---false if ($bool 8) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 9); Printed Result: string (3) "0.0"---true if ($bool 9) {ECho "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 11); Print Result: Array (0) {}---False if ($bool one) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 12); Print Result: Array (1) {[0]=> int (0)}---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 13); Print Result: Object (Iwanghang) #1 (0) {}---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 14); Print Result: Int (104)---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 15); Print Result: Float (---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 16); Print Result: float (1.0000000007)---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 17); Print Result: float (300000)---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 18); Print Result: float (6.0E-11)---true if ($bool 18) {echo "---true";} Else{echo "---false";}; echo "<br>"; Var_dump ($bool 19); Print Result: float (0.003)---True if ($bool) {echo "---true";} Else{echo "---false";}; echo "<br>";
The above is the Android programmer to learn PHP development (5)-Boolean scientific notation-phpstorm content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!