MultipleChoice
What will the following code piece print?
echo strtr('Apples and bananas', 'ae', 'ea')
OptionsMultipleChoice
Which of the following PHP values may NOT be encoded to a JavaScript literal using PHP's ext/json capabilities?
OptionsMultipleChoice
What parsing methodology is utilized by the SimpleXML extension?
OptionsMultipleChoice
How should you track errors on your production website?
OptionsFillInTheBlank
Which DOMElement property provides a reference to the list of the element's children?
FillInTheBlank
What is the output of the following code?
class Number {
private $v = 0;
public function __construct($v) { $this->v = $v; }
public function mul() {
return function ($x) { return $this->v * $x; };
}
}
$one = new Number(1);
$two = new Number(2);
$double = $two->mul()->bindTo($one);
echo $double(5);
MultipleChoice
What is the output of the following code?
$a = 3;
switch ($a) {
case 1: echo 'one'; break;
case 2: echo 'two'; break;
default: echo 'four'; break;
case 3: echo 'three'; break;
}
OptionsMultipleChoice
What is the output of the following code?
$a = 'a'; $b = 'b';
echo isset($c) ? $a.$b.$c : ($c = 'c').'d';
OptionsMultipleChoice
What is the output of the following code?
echo "1" + 2 * "0x02";
OptionsMultipleChoice
What is the output of the following code?
echo "22" + "0.2", 23 . 1;
Options