CSE :: PHP - CS
-
What will be the output of the following PHP code?
<?php
function sayHello()
{
echo "HelloWorld<br />";
}
$function_holder = "sayHello";
$function_holder();
?>
-
What will be the output of the following PHP code?
span>
function one()
{
echo " this works";
function two()
{
echo "this too works";
}
}
one();
two();
?>
-
What will be the output of the following PHP code?
<?php
function do($myString)
{
echo strpos($myString, "donkey",0);
}
do("The donkey looks like a horse.");
?>
-
What will be the output of the following PHP code?
<?php
function onespan>()
{
define("const","I am awesome!");
echo constant("const");
}
one();
?>
-
What will be the output of the following PHP code?
<?php
$title = "O'malley wins the heavyweight championship!";
echo ucwords($title);
?>
-
What will be the output of the following PHP code?
<?php
echo str_pad("Salad", 5)." is good.";
?>
-
What will be the output of the following PHP code?
<?php
echo ucwords("i love my country");
?>
-
What will be the output of the following PHP code?
<?php
echo lcfirst("welcome to India");
?>
-
What will be the output of the following PHP code?
<?php
echo hex2bin("48656c6c6f20576f726c6421");
?>
-
What will be the output of the following PHP code?
<?php
$str = addslashes('What does "yolo" mean?');
echo($str);
?>