Home > Backend Development > PHP Tutorial > Phison-up10 mass production tool v1.78.00 commonly used PHP object type judgment

Phison-up10 mass production tool v1.78.00 commonly used PHP object type judgment

WBOY
Release: 2016-07-29 08:38:40
Original
1029 people have browsed it



Commonly used numerical judgment functions in PHP


//Judgment array
$colors = array("red", "blue", "green");
if(is_array($colors))
{
print("colors is an array"."
");
}
//double Precision number judgment
$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"."
");
}
?>

< /HTML>

The above introduces the commonly used PHP object type judgment of phison-up10 mass production tool v1.78.00, including the content of phison-up10 mass production tool v1.78.00. I hope it will be helpful to friends who are interested in PHP tutorials.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template