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 trial

PHP PHP Basics (Retired) PHP Operators More Comparison Operators

Paul M
Paul M
16,370 Points

Would the var_dump be considered a boolean?

I was wondering would the var_dump be considered a boolean?

2 Answers

Kireeti K
Kireeti K
9,675 Points

VarDump Returns the info about the variable and the value it holds, It is not related or can be compared to any data type

For example: $a = 10; //here $a is integer and it holds value 10

when u do var_dump($a) it returns int(10) Which says type integer and value 10. Hope this answers your question.

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

var_dump is a function with no return type. So no, it wouldn't be a boolean. Now the success or failure of the execution of that function might be, but I'm not even sure why you might need that. Here's some information about it:

http://php.net/manual/en/function.var-dump.php