What is the output of this code?
<div class="question_list_op">
<?php
$w = 4;
$e = 5;
$b = 8;
$m = 2;
echo $w + $e * $b + $m;
?>
</div>
91
82
90
46
Correct!
Wrong!
What is the outcome of this piece of code:
<div class="question_list_op">
<?php
$a = 11;
$b = 7;
echo $a | $b;
?>
</div>
0
4
15
19
Correct!
Wrong!
What is the value of $val?
<div class="question_list_op">
<?php
$php_arr = array(21, 22, 23, 24);
foreach ($php_arr as & $web) {
$web *= 3 + 1;
} $mull = $php_arr [2];
echo $mull;
?>
</div>
92
13
43
14
Correct!
Wrong!
What is the content of $webmull after the following code has executed?
<div class="question_list_op">
<?php
$web = 3;
$mull = 4;
$webmull = ($web++ * ++$mull);
echo $webmull;
?>
</div>
20
16
15
4
Correct!
Wrong!
What is the outcome of this piece of code:
<div class="question_list_op">
<?php
$webmull =2;
++$webmull;
$webmull *= $webmull;
echo $webmull--;
?>
</div>
10
8
4
9
3
Correct!
Wrong!
What is the output of the following code?
<div class="question_list_op">
<?php
echo"12" + "0.1", 24 . 1;
?>
</div>
12.2231
12.1241
12.1,241
56.2
Correct!
Wrong!
What will be the output of the code below?
<div class="question_list_op">
<?php
$webmull = 7;
echo $webmull;
echo " ";
echo $webmull+++$webmull++;
echo " ";
echo $webmull;
echo " ";
echo $webmull---$webmull--;
echo " ";
echo $webmull;
?>
</div>
7 15 9 1 7
7 14 8 7 1
7 15 7 8 1
7 14 7 8 1
Correct!
Wrong!
What will this code output?
<div class="question_list_op">
<?php
$webmull = true and false;
var_dump($webmull);
?>
</div>
bool(false)
bool(true)
Correct!
Wrong!
What will $x be equal to after the statement $webmull = 4 + "16%" + "$35"?
<div class="question_list_op">
<?php
$webmull = 4 + "16%" + "$35";
echo $webmull;
?>
</div>
55
20
16
4
Correct!
Wrong!
What is the output of the following code: echo "1" + 2 * "0×02";
<div class="question_list_op">
<?php
echo "1" + 2 * "0×02";
?>
</div>
7
1
3
5
20
Correct!
Wrong!
Share the quiz to show your results !
Subscribe to see your results
PHP Basics Quiz questions for operators
I got %%score%% of %%total%% right
%%description%%
%%description%%
Loading...