Variables
1.

What will be the output of the following PHP code?

<?php
$x = 5;
$y = 10;
$z = "$x + $y";
echo "$z";
?>
A.  

15

B.  

10 + 5

C.  

$z

D.  

$x + $y

2.

What will be the output of the following PHP code?

<?php
$x = 5;
$y = 10;
$z = "$x + $y";
echo "$z";
?>
A.  

15

B.  

10 + 5

C.  

$z

D.  

$x + $y

3.

What will be the output of the following PHP code?

<?php
$x = 4;
$y = 3;
$z = 1;
echo "$x = $x + $y + $z";
?>
A.  

4 = 4 + 3 + 1

B.  

8

C.  

8 = 4 + 3 +1

D.  

Error

4.

What will be the output of the following PHP code?


<?php
$x = 4;
$y = 3
$z = 1;
$z = $z + $x + $y;
echo "$z";
?>
A.  

$z

B.  

15

C.  

8

D.  

1

5.

What will be the output of the following PHP code?


<?php
$x = 3.3;
$y = 2;
echo $x % $y;
?>
A.  

0

B.  

1

C.  

2

D.  

Error

6.

What will be the output of the following PHP code?


<?php
$x = 3.3;
$y = 2;
echo $x % $y;
?>
A.  

0

B.  

1

C.  

2

D.  

Error

7.

What will be the output of the following PHP code?

<?php
$x = 10;
$y = 4;
$z = 3;
echo $x % $y % $z;
?>
A.  

0

B.  

1

C.  

2

D.  

Error

8.

What will be the output of the following PHP code?

<?php
$x = 10;
$y = 4;
$z = 3;
echo ($x % ($y) + $z);
?>
A.  

5

B.  

3

C.  

0

D.  

1

9.

What will be the output of the following PHP code?

<?php
$x = 30;
$y = 20;
$z = 10;
echo $x + $y - $z / ($z - $y);
?>
A.  

41

B.  

-4

C.  

-5

D.  

51

10.

What will be the output of the following PHP code?

<?php
$x = 30;
$y = 20;
$z = 10;
echo $x + $y - $z / ($z - $y);
?>
A.  

41

B.  

-4

C.  

-5

D.  

51