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

Aaron John
Aaron John
203 Points

What am I doing wrong?

I created a variable $isIdentical then assigned the var_dump($a==="5") to it.

this is what i was tasked to do, then why is it saying "I cannot see a variable"

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

?>

1 Answer

Tianni Myers
Tianni Myers
10,453 Points

Hey Aaron,

It looks like you wrapped quotations around a number turning into a string and not a numeric value. Try it like this:

$isIdentical = var_dump($a===5);
Aaron John
Aaron John
203 Points

Nop,

<?php $a = 5; //Place your code below this comment $isBoolean = true; $isIdentical = var_dump($a===5);

?>

it's still showing I cannot see a variable named $isIdentical

Tianni Myers
Tianni Myers
10,453 Points

Oohh you are trying to var_dump the variable a?

$isIdentical = var_dump($a);
Aaron John
Aaron John
203 Points

I am trying to 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.