Home »
MCQs »
PHP MCQs
What will be the output of the following PHP code (17)?
70. What will be the output of the following PHP code?
<?php
echo (round(0.49) . "," . round(0.50) . "," . round(0.51));
?>
- 0,0,0
- 1,1,1
- 0,0,1
- 0,1,1
Answer: D) 0,1,1
Explanation:
The round() function is used to round a floating-point number to its nearest integer. Thus, the output will be 0,1,1.