• 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";

hello
error
no output
hi

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

134
1234
24
1

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

how are u
no output
error
hi

ANSWER DOWNLOAD EXAMIANS APP

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

0 1 2 3 4 5
0 1 2 3 4
error
0 1 2 3

ANSWER DOWNLOAD EXAMIANS APP

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

hihello
hi
hihellohi1
hi1

ANSWER DOWNLOAD EXAMIANS APP

PHP Control Structures (Loop)
What will be the output of the following PHP code ?
for ($i = 0; $i < 5; $i++) {
for ($j = $i;$j > $i; $i--)
print $i;
}

0 1 2 3 4 5
no output
infinite loop
0 1 0 1 2 0 1 2 3 0 1 2 3 4 0 1 2 3 4 5 0 1 2 3 4 5

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
↑