Javatpoint Logo
Javatpoint Logo

PHP is_int() function

By using this function, we can check the input variable is integer or not. This function was introduced in PHP 4.0.

Syntax

Parameters

Parameter Description Is compulsory
var_name The variable being checked. compulsory

Return type

This function returns true if var_name is an integer, Otherwise false.

Example 1

Output:

PHP Variable Handling is_int() function

Example 2

Output:

PHP Variable Handling is_int() function

Example 3

Output:

PHP Variable Handling is_int() function

Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA