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

Jamie Wyton
Jamie Wyton
3,011 Points

I've put in this code and apparently it cant see that ive put in the variable $booleanTwo

?

index.php
<?php
$a = 5;
//Place your code below this comment
$booleanOne = true;
$booleanTwo = var_dump($a === "5");
?>

2 Answers

andren
andren
28,558 Points

The message is a bit misleading, it can see the $booleanTwo variable, it just isn't sat to the right value. It doesn't want the result of var_dump stored but the value of $a === "5" on it's own. Like this:

<?php
$a = 5;
//Place your code below this comment
$booleanOne = true;
$booleanTwo = $a === "5";
?>

That will store the result of $a === "5" (which is false) into the $booleanTwo variable.

Thomas Fildes
Thomas Fildes
22,687 Points

Hi Jamie,

This is the code I used to pass this challenge below:

<?php
$a = 5;
//Place your code below this comment
$booleanOne = true;
$booleanTwo = $a === "5";
?>

You just need to remove your var_dump and it should let you pass.

Hope this helps! Happy Coding!