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."
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *