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.