What is var_dump in PHP

Var_dump function is used to check the data type of a variable. In PHP we do not have to write the data type while declaring the variable so if we want to print the data type we will use “var_dump” function to see type of data of the variable.

For example:

Output:-

Here, we can see in the output that it has printed the data type of all the variables which we have used.

Reference:

Tagged : / /