Blogger Information
Blog 19
fans 0
comment 0
visits 10083
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0803 PHP编程作业
bloght5386
Original
530 people have browsed it

1. php变量的8种数据类型?

  1. 整数型(int)、小数型(float/double)、字符串(string)、布尔型(boolean)、数组(array)、对象(object)、nullresource(资源型)

2. php变量类型的转换?

  1. 自动类型转换
  2. $a = '2';//字符串类型
  3. $a *=2;//整数类型
  4. 强制类型转换
  5. $f = 100.12;
  6. $f = settype($f,"int");//强制转换为整型

3. 如何定义php常量, 实例演绎php变量与常量的区别?

  1. //声明常量
  2. define("ADMIN",admin);
  3. const FU = "admin";
  4. //声明变量
  5. $name = 'liu';
Correcting teacher:PHPzPHPz

Correction status:qualified

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post