PHP Digital judgment Function _php Tutorial

Source: Internet
Author: User
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 ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.