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"." "); } ?> |
TAG:函数,数组,数值,整数,精度
评论加载中...
|
上一篇: Linux下FTP服务器配置
下一篇: Webmail攻防实战(4)