• 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 = "a";
if ($a)
print "all";
else
print "some";

no output
some
all
error

ANSWER DOWNLOAD EXAMIANS APP

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

hi
how are u
error
no output

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$b = 1;
switch(print $b) {
case 2:
print "hello";
break;
case 1:
print "hi";
break;
default:
print "hi1";
}

1hello
error
1hi
1hi1

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;
}

1234567891011
infinite loop
123456789101112
12345678910

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
$user = array("Ashley", "Bale", "Shrek", "Blank");
for ($x = 0; $x < count($user); $x++) {
if ($user[$x] == "Shrek")
continue;
printf ($user[$x]);
}

AshleyBaleBlank
AshleyBale
No output
AshleyBaleShrek

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for(++$i; ++$i; ++$i) {
print $i;
if ($i == 4)
break;
}

24
1234
134
1

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
↑