Which of the following statements about PHP is false? (Choose 2)
You want to allow your users to submit HTML code in a form, which will then be displayed as real code and not affect your page layout. Which function do you apply to the text, when displaying it? (Choose 2)
What is the output of the following code?
echo "1" + 2 * "0x02";
Which value will be assigned to the key 0 in this example?
$foo = array(true, '0' => false, false => true);
An object can be counted with count() and sizeof() if it...
Which of the following superglobals does not necessarily contain data from the client?
What is the output of the following code?
function fibonacci (&$x1 = 0, &$x2 = 1)
{
$result = $x1 + $x2;
$x1 = $x2;
$x2 = $result;
return $result;
}
for ($i = 0; $i < 10; $i++) {
echo fibonacci() . ',';
}
Which of the following is true about stream contexts? (Choose 2)
How should class MyObject be defined for the following code to work properly? Assume $array is an array and MyObject is a user-defined class.
$obj = new MyObject();
array_walk($array, $obj);
Which of the following statements about exceptions is correct? (Choose 2)