Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialLuca Spezzano
10,417 Pointsvar_dump?
I didn't understand why with the var_dump it print the result? any help? maybe var_dump always print what is inside()?
1 Answer
Jonathan Grieve
Treehouse Moderator 91,253 PointsHi there, Luca,
Yes I think you've got it right, var dump is a pre build PHP function that displays the contents including the type of variable.
So you could use it to inspect the contents of an array, or a variable or an object.
As i recall the output would be something like this
one[0], => two[1]
It's just a list of what makes up a particular object. :-)
Luca Spezzano
10,417 PointsLuca Spezzano
10,417 Pointsthanks :)