• 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 ?
$var1 = 1;
echo $var1 = ++$var1 % 2 + ++$var1;

1
2
3
0

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
function fun($x,$y) {
$x = 4;
$y = 3;
$z = $x + $y / $y + $x;
echo "$z";
}
fun(3, 4);

0
Error
7
9

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;

20
true0
0
true20

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
print_r "Hello world"

Nothing
Error
Missing semicolon error
Hello World

ANSWER DOWNLOAD EXAMIANS APP

PHP Operators and Expressions
What will be the output of the following PHP code ?
define("VAR_NAME","test");
${VAR_NAME} = "value";
echo VAR_NAME;
echo ${VAR_NAME};

testvalue
test
error, constant value cannot be changed
testtest

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

0
Error
Nothing
5

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
↑