To check the data type of a variable in PHP, which function do you use?
is_type()
gettype()
datatype()
typeof()
To check the data type of a variable in PHP, you use the
gettype()
function. This function returns a string indicating the data type of the variable, such as "integer," "string," or "array."
Loading...
Related Quiz
- How can you upload a file in PHP?
- The filter_list() function is used to get the list of all supported filters in PHP.
- It's possible to have an array of arrays in PHP.
- You need to sort an associative array in your PHP script based on its keys, in descending order. How would you do this?
- What are superglobals in PHP?