Output of following PHP code?
<?php
if (3.2)
print "true";
else
print "false";
?>
if (3.2)
print "true";
else
print "false";
?>
Correct!
Wrong!
-
what will be the output of below code ?
<?php
$webmull="99.9degrees";
(double)$webmull;
(int)$webmull;
(string)$webmull;
echo $webmull;
?>
$webmull="99.9degrees";
(double)$webmull;
(int)$webmull;
(string)$webmull;
echo $webmull;
?>
Correct!
Wrong!
-
what will be the output of below code ?
<?php
$webmull="21.6degrees";
(double)$webmull;
(int)$webmull;
echo (string)$webmull;
?>
$webmull="21.6degrees";
(double)$webmull;
(int)$webmull;
echo (string)$webmull;
?>
Correct!
Wrong!
-
What will be printed?
<?php
$php_var = '0';
if ($php_var) {
echo 'true';
} else {
echo 'false';
}
?>
$php_var = '0';
if ($php_var) {
echo 'true';
} else {
echo 'false';
}
?>
Correct!
Wrong!
-
What will be printed?
<?php
$webmull = array();
if ($webmull == null) {
echo 'true';
} else {
echo 'false';
}
?>
$webmull = array();
if ($webmull == null) {
echo 'true';
} else {
echo 'false';
}
?>
Correct!
Wrong!
-
What will be printed?
<?php
if ('6' == '06') {
echo 'true';
} else {
echo 'false';
}
?>
if ('6' == '06') {
echo 'true';
} else {
echo 'false';
}
?>
Correct!
Wrong!
-
What is the outcome of this piece of code:
<?php
$a = "";
echo gettype($a);
echo empty($a);
echo is_null($a);
echo isset($x);
?>
$a = "";
echo gettype($a);
echo empty($a);
echo is_null($a);
echo isset($x);
?>
Correct!
Wrong!
-
What is the outcome of this piece of code:
<?php
$webmull = true;
echo $webmull;
?>
$webmull = true;
echo $webmull;
?>
Correct!
Wrong!
-
What is the output of this piece of code:
<?php
$web = 16;
$mull = '16';
echo $web == $mull;
?>
$web = 16;
$mull = '16';
echo $web == $mull;
?>
Correct!
Wrong!
-
What is the output of this piece of code:
<?php
var_dump(79);
var_dump(079);
?>
var_dump(79);
var_dump(079);
?>
Correct!
Wrong!
-

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