Blogger Information
Blog 34
fans 0
comment 0
visits 28423
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
php412
1A7498的博客
Original
714 people have browsed it
<?php
$zhengshu = 30; //1整型 integer
$fudian = 1234.56; //2.浮点 float
$zifuchuan = 'peter'; //3 字符串
$buer = true;  //4. 布尔型,true真,false假
$kong;
echo $zhengshu.'<hr>';
print $fudian.'<hr>';
var_dump ($zifuchuan);
echo '<hr>';
var_dump(isset($zhengshu));
var_dump(isset($fudian) ? true : false);
var_dump(isset($zifuchuan) ? true : false);
var_dump(isset($kong) ? true : false); //false,未赋值并不报错,与is_null不同
echo '<hr>';
@var_dump(is_null($kong) ? true : false);
echo '<hr>';
var_dump(empty($kong) ? true : false);
echo '<hr color="blue">';
var_dump(isset($zhengshu));  //有无判断
var_dump(empty($zifuchuan));  //非空判断
@var_dump(is_null($kong)); //null
function z9527(){
	global $fudian;
	echo '<hr>小数是:'.$fudian;
}
echo z9527();
?>
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
  • 2018-03-16 11:39:01