PHP Learning Note Two

Source: Internet
Author: User

<?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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.