All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

 
PHP实例:常用的数值判断函数_[PHP教程]

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/2/17 7:33:09 Browse times: 336 Comment times: 0

PHP实例:常用的数值判断函数_[PHP教程]


Head photo

Go homepage
Upload pictures
Write articles

PHP实例:常用的数值判断函数_[PHP教程] 常用的对象类型判断

常用的数值判断函数


//判断数组
colors = array("red", "blue", "green");
if(is_array(colors))
{
print("colors is an array"."");
}
//双精度数判断
Temperature = 15.23;
if(is_double(Temperature))
{
print("Temperature is a double"."");
}
//整数判断
PageCount = 2234;
if(is_integer(PageCount))
{
print("PageCount is an integer"."");
}
//对象判断
class widget
{
var name;
var length;
}
thing = new widget;
if(is_object(thing))
{
print("thing is an object"."");
}
//字符判断
Greeting = "Hello";
if(is_string(Greeting))
{
print("Greeting is a string"."");
}
?>





There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.