This function determines whether the provided value is an integer or not.
This function does not generate a change.
is_int(value)
Argument | Type | Description |
---|---|---|
value | any (required) | The value to be tested. |
Returns true
if the given value is an integer, else it returns false
.
This code shows some return values for is_int():
[
is_int( 42 ),
is_int( 0x2a ),
is_int( 42.0 ),
is_int( '42' ),
is_int( true ),
];
Return value in JSON format
[
true,
true,
false,
false,
false
]