41.
What will be the output of the following PHP code ?
<?php
class myObject { }
define('myObject::CONSTANT', 'test');
echo myObject::CONSTANT; 
?>

42.
What will be the output of the following PHP code ?
<?php
$x = 5;
$y = 10;
$z = "$x + $y";
echo "$z";
?>

43.
What will be the output of the following PHP code ?
<?php
$x = 4;
$y = 3;
$z = 1;
echo "$x = $x + $y + $z";
?>

44.
What will be the output of the following PHP code ?
<?php
$x = 4;
$y = 3
$z = 1;
$z = $z + $x + $y;
echo "$z";
?>

45.
What will be the output of the following PHP code ?
<?php
$x = 3.3;
$y = 2;
echo $x % $y;
?>

46.
What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 4;
$z = 3;
echo $x % $y % $z;
?>

47.
What will be the output of the following PHP code ?
<?php
$x = 10;
$y = 4;
$z = 3;
echo ($x % ($y) + $z);
?>

48.
What will be the output of the following PHP code ?
<?php
$x = 30;
$y = 20;
$z = 10;
echo $x + $y - $z / ($z - $y);
?>

49.
What will be the output of the following PHP code ?
<?php
$x = 4;
$y = -3;
$z = 11;
echo 4 + $y * $z / $x;
?>

50.
What will be the output of the following PHP code ?
<?php
$x = 3.5;
$y = 2;
$z = 2;
echo $x / $y / $z;
?>

Read More Section(Operators and Expressions in php)

Each Section contains maximum 100 MCQs question on Operators and Expressions in php. To get more questions visit other sections.