How many error levels are available in PHP?
Which version of PHP introduced try/catch exception?
Which character does the error_reporting directive use to represent the logical operator NOT?
Which method enables you to calculate whether daylight saving time is in force at a specific date and time?
Which one of the following filter is used to filter several variables with the same or different filters?
The class from which the child class inherits is called ________?
i) Child class
ii) Parent class
iii) Super class
iv) Base class
Say we have two compare two strings which of the following function/functions can you use?
i) strcmp()
ii) strcasecmp()
iii) strspn()
iv) strcspn()
What will be the output of the following PHP code?
<?php
function addFunction($num1, $num2)
{
$sum = $num1 + $num2;
return $sum;
}
$return_value = addFunction(10, 20);
echo "Returned value from the function : " .$return_value
?>
<?php
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");
$a3 = array("i" => "orange");
$a4 = array_merge($a2, $a3);
$result = array_diff($a1, $a4);
print_r($result);
?>
What will be the output of the following PHP code?
<?php
$text = "this is\tsome text that\nwe might like to parse.";
print_r(split("[\n\t]",$text));
?>