• 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 Operators and Expressions

PHP Operators and Expressions
What will be the output of the following PHP code ?
$i = 0;
while ($i = 10) {
print "hi";
}
print "hello";

error
hihello
infinite loop
hello

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$x=0; function fun() {
echo $GLOBALS['x'];
$GLOBALS['x']++;
}
fun();
fun();
fun();

123
000
012
Error

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$i = 10;
$j = 0;
if ($i || ($j = $i + 10)) {
echo "true";
}
echo $j;

0
true20
true0
20

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
In PHP the integer 45 is stored exactly as 45. The floating point number 46.3 could be stored as.

46.2999999
none of above
46
46.3

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$x = 4;
$y = 3$z = 1;
$z = $z + $x + $y;
echo "$z";

1
$z
15
8

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
function fun() {
static $x = 0;
echo $x;
$x++;
}
fun();
fun();
fun();

012
Error
111
123

ANSWER DOWNLOAD EXAMIANS APP
MORE MCQ ON PHP Operators and Expressions

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
↑