var_dump() displays information about variables in a simple, readable format. This function is very useful when debugging – providing a simple and easy way to display the current contents of one or more variables.
For simple scalar variables (such asbooleans,integers,strings, anddoubles), the type of the variable is printed, followed by an opening bracket, the value contained in the variable, and a closing bracket.
Resource pointers have their type (resource), ID number (such as 1, 2, or 45) and type of resource (such asdirorfile) displayed. The ID number assigned to a resource pointer reflects the order in which the resource pointer was created. (For example, the fifth resource pointer in a script has an ID number of 5.)
Arrays are printed as a list of keys and values, and have their typearray) printed at the top of the list.
Objects are handled in a fashion similar to that of arrays. The class of which the object is an instance is displayed, followed by the typeobject). After this, a list of the object’s member variables is printed.