Posted in PHP onApril 24, 2012
<HTML> <HEAD> <TITLE>常用的数值判断函数</TITLE> </HEAD> <BODY> <? //判断数组 $colors = array("red", "blue", "green"); if(is_array($colors)) { print("colors is an array"."<br>"); } //双精度数判断 $Temperature = 15.23; if(is_double($Temperature)) { print("Temperature is a double"."<br>"); } //整数判断 $PageCount = 2234; if(is_integer($PageCount)) { print("$PageCount is an integer"."<br>"); } //对象判断 class widget { var $name; var $length; } $thing = new widget; if(is_object($thing)) { print("thing is an object"."<br>"); } //字符判断 $Greeting = "Hello"; if(is_string($Greeting)) { print("Greeting is a string"."<br>"); } ?> </BODY> </HTML>
PHP的几个常用数字判断函数代码
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@