If you have already register Login here.
Data Types defines the type of data a variable can store. PHP allows eight different types of data types. All of them are discussed below. The first five are called simple data types and the last three are compound data types:
The first five are simple types, and the next two (arrays and objects) are compound - the compound types can package up other arbitrary values of arbitrary type, whereas the simple types cannot.
We will explain only simple data types in these chapters. Array and Objects will be explained separately
Function | Purpose |
is_bool() | Test if a variable holds a boolean value |
is_numeric() | Test if a variable holds a numeric value |
is_int() | Test if a variable holds an integer |
is_float() | Test if a variable holds a floating-point value |
is_string() | Test if a variable holds a string value |
is_null() | Test if a variable holds a Null value |
is_array() | Test if a variable holds is an array |
is_object() | Test if a variable holds is an object |
© 2025 Easy To Learning. All Rights Reserved | Design by Easy To Learning