Summary of PHP Data type judgment functions & lt ;? Php judgment array $ colorsarray (& quot; red & quot;, & quot; blue & quot;, & quot; green & quot;); if (is_array ($ colors )) {print (& quot; colorsisanarray & quot ;. & quot; & lt; br & gt; & quot;) ;}double-precision number judgment $ Tem PHP Data type judgment Function Summary
// 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 "."
");
}
?>