<?php
function test($int)
{
if ($int == 1)
echo "This Works";
if ($int == 2)
echo "This Too Seems To Work";
}
test(1);
TEST(2);
?>Select an option to see the answer and solution.
Practice every MCQ with options. Use Show answers when you want the correct option and solution.
81
Questions
4/5
Page
Pick an option on a question to see the right answer and solution.
<?php
function test($int)
{
if ($int == 1)
echo "This Works";
if ($int == 2)
echo "This Too Seems To Work";
}
test(1);
TEST(2);
?>Select an option to see the answer and solution.
<?php
function mine($num)
{
num;
echo $num;
}
mine(3);
?>Select an option to see the answer and solution.
<?php
function mine($num)
{
num;
echo "$num";
}
mine(3);
?>Select an option to see the answer and solution.
<?php
function movie($int)
{
$movies = array("Fight Club", "Kill Bill", "Pulp Fiction");
echo "You Do Not Talk About ". integer];
}
movie(0);
?>Select an option to see the answer and solution.
<?php
function addFunction(num2)
{
num1 + $num2;
return $sum;
}
$return_value = addFunction(10, 20);
echo "Returned value from the function : " .$return_value
?>Select an option to see the answer and solution.
<?php
function time($string)
{
echo strtr("Towe Pa55", "ow5", $string);
}
time("ims");
?>Select an option to see the answer and solution.
<?php
function constant()
{
define("GREETING", "Welcome to Narnia");
echo greeting;
}
?>Select an option to see the answer and solution.
<?php
function constant()
{
define("GREETING", "Welcome to Narnia",true);
echo greeting;
}
?>Select an option to see the answer and solution.
<?php
function start($string)
{
if ($string < 45)
return 20;
else
return 40;
}
$t = start(90);
if ($t < 20)
{
echo "Have a good day!";
}
else
{
echo "Have a good night!";
}
?>Select an option to see the answer and solution.
<?php
function email()
{
$email = ’[email protected]’;
email, ‘@');
echo $new;
}
email();
?>Select an option to see the answer and solution.
<?php
function string()
{
echo strstr("Hello world!", 111);
}
string();
?>Select an option to see the answer and solution.
Select an option to see the answer and solution.
usleep(1000000);
Select an option to see the answer and solution.
$array = array(0, 1, 2);
array, -6, ‘NEW’);
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.
$Var = substr(""abcdef"", -4, 1);
Select an option to see the answer and solution.
Select an option to see the answer and solution.
Select an option to see the answer and solution.