<?PHP//Boolean type $a=true;//value is case-insensitive $b=false;//integer 0, floating-point number 0.0, empty string, not including array of any elements, empty object, null denotes false $c=0; if($c==false) { Echo"False"; } Echo"<br/>"; $e=""; if($e==false) { Echo"Empty string is also false"; } Echo"<br/>"; $f=NULL; if($f==false) { Echo"Null value is also false"; } Echo"<br/>"; //floating point number case//floating point accuracy is 14 (starting from the left, the first non-0 is the beginning of the precision) $a=0.2345678333333333345567898; $b=0.00000000002345678333333333345567898; Echo' $a = '.$a; Echo"<br/>"; Echo"$b=".$b; //the length of a string that takes up a byte//string depends on the memory size of the Local machine//string can be double quotation marks or double quotation marks can be defined $i=90; $user 1= "Hello$i";//double quotes so $i will participate in the calculation $user 2= ' hello$i ';//single quotes direct output string Echo' <br/>user1= '.$user 1; Echo' <br/>user2= '.$user 2; $v= "Abcd\" "; $v 2= ' abcd\ '; Echo' <br/> '; Echo $v; Echo"<br/>"; Echo $v 2; Echo"<br/>"; //arithmetic Operations $a=7/3; Echo $a;?>
PHP Learning Note Two