Introduction
In this article, I will explain the "var_dump" variable handling function in PHP. The var_dump() function dumps information about a variable. It displays structured data concerning one or additional expressions that feature its kind and value. Arrays and objects are explored recursively with values indented to point out structure.
Syntax
var_dump(variable);
Parameter | |
Variable | The variable you want to dump |
No value is returned.
Example 1
Example 2
Example 3
var_dump() vs print_r()
The var_dump() function is for structure information and the print_r() function shows readable information about variables.
Example 1
Example 2
Next Recommended ReadingString Functions in PHP: Part 12
I am MCA qualified from IGNOU, Currently working as a Senior Software Engineer at dogSpot Pvt Ltd, Gurgaon having 3+ year experience and also like web designing and development tools such as PHP, MySQL, HTML, CSS, JavaSc... Read more
https://www.c-sharpcorner.com/members/vinod-kumar167