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 trialMuhamed Halkic
Courses Plus Student 252 PointsI don't really understand it
I don't really understand what the task wants from me. Can someone help pls?
<?php
$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = '5';
var_dump($a == $isIdentical);
?>
2 Answers
Sinead O'Rourke
6,268 PointsI think the answer here is:
$isIdentical = ($a === "5")
So first you need to check if $a and the string "5" is equal + of the same type (using something like ===). Then you need to assign the answer of that into $isIdentical
Haven't actually watched this video yet, but you could give it a shot ?
Muhamed Halkic
Courses Plus Student 252 PointsThank you so much Sinead! (you don't know how I'm happy right now haha)
M Glasser
10,868 PointsGot stuck here as well! Realizing now that var_dump() is a function that returns the kind and value of whatever is passed into the parentheses (a.k.a. arguments). So, $isIdentical effectively gets declared as a boolean variable once the strict comparison operator is used in Sinead's example. If we take a var_dump on $isIdentical (sorry couldn't resist) then it should return "boolean(false)" to the console since it's purpose is to "dump" information about the variable. In this case we have a variable that is a boolean and it's value is false. More about var_dump here: http://php.net/manual/en/function.var-dump.php
Muhamed Halkic
Courses Plus Student 252 PointsMuhamed Halkic
Courses Plus Student 252 Points"Create a new variable name $isIdentical. Compare the variable $a as equal and of the same type as the string "5" and assign the results to $isIdentical."