Is there an is_type () function in PHP?

Source: Internet
Author: User
Is there an is_type () function in PHP? Http://docs.php.net/manual/zh/language.types.intro.php

If you just want to get an easy-to-understand expression of the type for debugging, use the gettype () function. To view a type, use the is_type function instead of gettype.

Problem:
1. is there an is_type () function in the PHP manual?


Reply to discussion (solution)


Is_array -- check whether the variable is an array
Is_bool -- check whether the variable is Boolean
Is_callable -- check whether the parameter is a valid callable structure
Is_double -- is_float () alias
Is_float -- check whether the variable is floating-point
Is_int -- check whether the variable is an integer
Is_integer -- alias of is_int ()
Is_long -- alias of is_int ()
Is_null -- check whether the variable is NULL
Is_numeric -- checks whether the variable is a numeric or numeric string
Is_object -- check whether the variable is an object
Is_real -- alias of is_float ()
Is_resource -- check whether the variable is of the resource type
Is_scalar -- checks whether the variable is a scalar.
Is_string -- check whether the variable is a string

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.