PHP's several commonly used number judgment function code, mainly including double precision, integer, character judgment and so on.
Commonly used numerical judgment function
"); } 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". "
"); } The object determines the 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". "
"); } ? >
Articles you may be interested in
- PHP converts Arabic numerals into Chinese character functions
- PHP generates consecutive numbers (Letters) array function range () analysis, PHP lottery program function
- PHP commonly used to determine the function of variables
- PHP's most accurate string-length intercept function
- PHP to get the first letter of Chinese pinyin function (really can use)
- PHP judgment function, class, class method exists
- PHP to judge the function of visiting spider information
- PHP reads directories and tables displays the functions of files in the directory
http://www.bkjia.com/PHPjc/764080.html www.bkjia.com true http://www.bkjia.com/PHPjc/764080.html techarticle PHP's several commonly used number judgment function code, mainly including double precision, integer, character judgment and so on. HTML HEAD TITLE commonly used in the numerical judgment function/title/head BODY? Judging array $color ...