PHP PHP Basics Daily Exercise Program True PHP

Matthew Cushing
Matthew Cushing
12,048 Points

"True PHP" Challenge not coming out right?

I honestly have no idea what I'm doing wrong. I'm assigning the variable $isIdentical to the comparison between $a and the string "5" using 3 ==='s to make sure it's "identical" but it doesn't seem to work..... The error is that it "cannot see the variable $isIdentical"

I've tried restarting browser and the challenge multiple times.

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

2 Answers

KRIS NIKOLAISEN
KRIS NIKOLAISEN
53,537 Points

Try it without the var_dump

$isIdentical = "5" === $a;
Antonio De Rose
Antonio De Rose
20,860 Points

you are correct, but may I ask, why do you need a var_dump, does the question ask for it, was it a typo, or by intention.

Matthew Cushing
Matthew Cushing
12,048 Points

Honestly, just following the video. Video doesn't show you doing a boolean without var_dump. I assumed you had to use var_dump in order to compare.