Several common PHP numeric judgment function code. The code for copying the code is as follows: the commonly used value judgment function TITLEHEADBODY of HTMLHEADTITLE? Judge the array $ colorsarray (red, blue, green); if (is_array ($ colors) {print (colo
The code is as follows:
Common numeric judgment functions
// Determine the array
$ Colors = array ("red", "blue", "green ");
If (is_array ($ colors ))
{
Print ("colors is an array "."
");
}
// Double-precision data determination
$ Temperature = 15.23;
If (is_double ($ Temperature ))
{
Print ("Temperature is a double "."
");
}
// Integer judgment
$ PageCount = 2234;
If (is_integer ($ PageCount ))
{
Print ("$ PageCount is an integer "."
");
}
// Object judgment
Class widget
{
Var $ name;
Var $ length;
}
$ Thing = new widget;
If (is_object ($ thing ))
{
Print ("thing is an object "."
");
}
// Character judgment
$ Greeting = "Hello ";
If (is_string ($ Greeting ))
{
Print ("Greeting is a string "."
");
}
?>
The http://www.bkjia.com/PHPjc/325323.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/325323.htmlTechArticle code is as follows: html head title commonly used numerical judgment function/TITLE/head body? // Judge the array $ colors = array ("red", "blue", "green"); if (is_array ($ colors) {print ("colo...