• HOME
  • QUIZ
  • CONTACT US
EXAMIANS
  • COMPUTER
  • CURRENT AFFAIRS
  • ENGINEERING
    • Chemical Engineering
    • Civil Engineering
    • Computer Engineering
    • Electrical Engineering
    • Mechanical Engineering
  • ENGLISH GRAMMAR
  • GK
  • GUJARATI MCQ

PHP Control Structures (Loop)

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$a = "1";
$b = "0";
if ((int)$a && $b)
print"hi";
else
print "hello";

no output
hi
hello
error

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for ($x = -1; $x < 10;--$x) {
print $x;
}

12345678910
1234567891011
infinite loop
123456789101112

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$a = "";
if ($a)
print "all";
if
else
print "some";

all
error
no output
some

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$x = 10;
$y = 20;
if ($x > $y + $y != 3)
print "hi";
else
print "how are u";

no output
hi
how are u
error

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for(;;) {
print "10";
}

10
no output
error
infinite loop

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for ($count = 1; $count < 20; $count++);
print $count;

19
12345678910….1920
12345678910….19
20

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON PHP Control Structures (Loop)

DOWNLOAD APP

  • APPLE
    from app store
  • ANDROID
    from play store

SEARCH

LOGIN HERE


  • GOOGLE

FIND US

  • 1.70K
    FOLLOW US
  • EXAMIANSSTUDY FOR YOUR DREAMS.
  • SUPPORT :SUPPORT EMAIL ACCOUNT : examians@yahoo.com

OTHER WEBSITES

  • GUJARATI MCQ
  • ACCOUNTIANS

QUICK LINKS

  • HOME
  • QUIZ
  • PRIVACY POLICY
  • DISCLAIMER
  • TERMS & CONDITIONS
  • CONTACT US
↑