Nicholas Chetto4,221 Points
pretty sure the system is funky out or I'm just doing it wrong but I know I'm close anyone help please?.
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.
<?php $a = 5; //Place your code below this comment $isBoolean = true; $isIdentical = "5"; var_dump($a == $isIdentical); ?>
Jason AndersTreehouse Moderator 144,853 Points
You are on the right track and have all the pieces, there are just couple things out of place and one small error.
First, the challenge does not ask for a
vardump(), so that line needs to be deleted. Instructions are very specific and if not followed explicitly, the task will always return a
Bummer even if code is correct.
The Instruction want the comparison asked for to be stored in the variable
$isIdentical, but you are hard-coding a value there instead.
Second, the instructions do state that it wants a comparison to be
same type (===), but you are only checking for
Because you do have all the correct code (once the == is changed to ===), I have provide the corrected code snippet for the challenge for you to review with the above notes.
<?php $a = 5; //Place your code below this comment $isBoolean = true; $isIdentical = $a === "5"; ?>
Hopes this helps to clear things up. :)
Andres Ramirez17,240 Points
I was struggling with this answer as well. I don't remember anywhere in the videos using two equalities in the same line. Where can I find this explained more in detail?