Type Validation Functions in PHP

is_array() – Test for Arrays
is_bool() – Test for Booleans (TRUE, FALSE)
is_float() – Test for Floating-point numbers
is_int() – Test for Integers
is_null() – Test for NULLs
is_numeric() – Test forNumeric values, even as a string (e.g., ‘ 20’ )
is_resource() – Test for Resources, like a database connection
is_scalar() – Test for Scalar (single-valued) variables
is_string() – Test for Strings

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.