MCQs > IT & Programming > PHP 5 > Which is correct about the following PHP 7.1 code snippet? $x = 2.98765431; $y = 2.98765430; $epsilon = 0.00001; if(abs($x-$y) < $epsilon) { echo 'true'; } ?>

PHP 5 MCQs

Which of the given statements is correct about the following PHP 7.1 code snippet?

$x = 2.98765431;

$y = 2.98765430;

$epsilon = 0.00001; if(abs($x-$y) < $epsilon) {

echo "true";

}

?>

Answer

Correct Answer:

The code will compile and will print true. 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

PHP 5 Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it