PHP PHP Basics Daily Exercise Program True PHP

Katiuska A
Katiuska A
9,581 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 A
Katiuska A
9,581 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 A
Katiuska A
9,581 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';

?>