Evaluate the expression: 5+5 * 7-2
<?php
echo 5+5 * 7-2
?>
echo 5+5 * 7-2
?>
Correct!
Wrong!
-
What would be the output of
print 5 << 6
operations?
print 5 << 6
operations?
<?php
print 5 << 6;
?>
print 5 << 6;
?>
Correct!
Wrong!
-
What will be the value of $var?
<?php
$php_var = 3 / 4;
echo $php_var;
?>
$php_var = 3 / 4;
echo $php_var;
?>
Correct!
Wrong!
-
What is the output?
<?php
$RESULT = 12 + 012 + 0x12;
echo "$RESULT";
?>
$RESULT = 12 + 012 + 0x12;
echo "$RESULT";
?>
Correct!
Wrong!
-
What will be the value of $var below?
<?php
$php_var = true ? '2' : false ? '1' : '4';
echo $php_var;
?>
$php_var = true ? '2' : false ? '1' : '4';
echo $php_var;
?>
Correct!
Wrong!
-
What is the value of $webmull?
<?php
$web= 20;
$mull= 1;
$webmull= $mull?:$web;
?>
$web= 20;
$mull= 1;
$webmull= $mull?:$web;
?>
Correct!
Wrong!
-
True or false?
<?php
echo 456 !== 0456;
?>
echo 456 !== 0456;
?>
Correct!
Wrong!
-
What is the outcome of this piece of code?
<?php
$web = 1;
$mull = 10;
$web ^= $mull ^= $web ^= $mull;
echo $web;
?>
$web = 1;
$mull = 10;
$web ^= $mull ^= $web ^= $mull;
echo $web;
?>
Correct!
Wrong!
-
What is the output of this piece of code:
<?php
if ('0210320402215600124' === '320122040242132001264')
echo 'equal'; else
echo 'not equal';
?>
if ('0210320402215600124' === '320122040242132001264')
echo 'equal'; else
echo 'not equal';
?>
Correct!
Wrong!
-
What is the outcome of this piece of code:
<?php
$web = 9;
$mull = 10;
echo $web ^ $mull;
?>
$web = 9;
$mull = 10;
echo $web ^ $mull;
?>
Correct!
Wrong!
-

PHP Basics Quiz questions for operators
I got %%score%% of %%total%% right