• 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 ?
one = 1;
two = 2;
three = 3;
four = 4;
echo "one / two + three / four";

0.75
1.25
Error
0.05

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$i = 2;
while (++$i) {
while ($i --> 0)
print $i;
}

10
210
no output
infinite loop

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();

Error
123
000
012

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
class Constants{
define('MIN_VALUE', '0.0');
define('MAX_VALUE', '1.0');
public static function getMinValue() {
return self::MIN_VALUE;
}
public static function getMaxValue() {
return self::MAX_VALUE;
}
}
echo Constants::getMinValue();
echo Constants::getMaxValue();

01
0.01.0
No output
ERROR

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$y = 2;
$w = 4;
$y *= $w /= $y;
echo $y, $w;

80.5
44
82
42

ANSWER DOWNLOAD EXAMIANS APP

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

Error
Nothing
5
0

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
↑