PHP MCQs with answers Page - 4

Dear candidates you will find MCQ questions of PHP here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question

Y

Yogesh • 7.43K Points
Tutor III

Q. If you echo a Boolean variable, the value FALSE displays as a .... and the value TRUE echoes as a .....

  • (A) 0, 1
  • (B) blank string, 2
  • (C) empty variable, 1
  • (D) blank string, 1

Y

Yogesh • 7.43K Points
Tutor III

Q. strval()

  • (A) Accepts a value and converts it into a string array
  • (B) None of above
  • (C) Accepts a value and converts it into an string dictionary
  • (D) Accepts a value and converts it into string equivalent

Y

Yogesh • 7.43K Points
Tutor III

Q. What will be the output of the following PHP code?

Code:
<?php
function start($string)
{
    if ($string < 45)
        return 20;
    else
        return 40;
}
$t = start(90);
if ($t < 20)
{
    echo "Have a good day!";
}
else
{
    echo "Have a good night!";
}
?>
  • (A) ERROR
  • (B) Have a good day!
  • (C) Have a good night!
  • (D) None of the mentioned

Loding content...

Download our easy to use, user friendly Android App from Play Store. And learn MCQs with one click.

Image

Login

Forgot username? click here

Forgot password? Click here

Don't have account? Register here.