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 Daily Exercise Program True PHP

Katiuska Alicea de Leon
Katiuska Alicea de Leon
10,341 Points

I'm not sure what it is being asked of me in this task

Not only am I not sure what the instructions are but now I'm getting a message saying that the first task is not passing, even after the first try. Can any one help me with one or the other?

Thanks!

index.php
<?php
$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = 5;

var_dump($a === $isIdentical;

?>
Katiuska Alicea de Leon
Katiuska Alicea de Leon
10,341 Points

It is also saying something about string "5", there's no "5" anywhere. It's an integer, that's what I was given to work with. They say 5 should fit in value and type. Should I change the integer 5 to a "5"?

1 Answer

Hi, Alicea. They want you to store the result of comparison between variable $a and string of "5" into $isIdentical variable. To check for identical use === operator. Maybe this can give you a hint.

<?php
5 === "5"; // this will return false;
Katiuska Alicea de Leon
Katiuska Alicea de Leon
10,341 Points

I didn't understand you,either, but the hint helped. I think it was simpler than I thought.

Haha, Then, maybe this can make it more clear

<?php

$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = $a === '5';

?>