• 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 ?
$x =4;
$y = 3;
function fun($x, $y) {
$z = $x + $y / $y + $x;
echo "$z";
}
echo $x;
echo $y;
echo $z;
fun(3, 4);

437
439
349
347

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$var1 = 1;
echo $var1 = ++$var1 % 2 + ++$var1;

0
2
3
1

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$y = 2;
if ($y-- == ++$y) {
echo $y;
}

3
no output
2
1

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
define("NEW_GOOD_NAME_CONSTANT", "I have a value");
define("OLD_BAD_NAME_CONSTANT", NEW_GOOD_NAME_CONSTANT);
echo NEW_GOOD_NAME_CONSTANT;
echo OLD_BAD_NAME_CONSTANT;

I have a valueNEW_GOO_NAME_CONSTANTS
I have a value
ERROR
I have a valueI have a value

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$a = '4';
print + + $a;

5
error
0
no output

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
$4four = 4;
$3three = 3;
$2two = 2;
echo $4four + $3three / $2two - 1;

7
3.5
4.5
Error

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
↑