Which of the following may be used in conjunction with CASE inside a SWITCH statement?
A. A scalar
B. An expression
C. A boolean
D. All of the above
What is the output of the following code?
$first = "second"; $second = "first"; echo $$$first;
A. "first"
B. "second"
C. an empty string
D. an error
How should you track errors on your production website?
A. Enabling display_errors
B. Enabling log_errors
C. Having a site-wide exception handler
D. Setting error_reporting to E_ALL and ~E_NOTICE
From your PHP application, how can you send the same header twice, but with different values?
A. Set the second argument of the header() function to false
B. PHP does that automatically
C. You may only send a particular type of header once
D. Use the header_add() function
What is the output of the following code?
function append($str)
{
$str = $str.'append';
}
function prepend(and$str)
{
$str = 'prepend'.$str;
}
$string = 'zce';
append(prepend($string));
echo $string;
A. zceappend
B. prependzceappend
C. prependzce
D. zce
What is the output of the following code?
class a
{
public $val;
}
function renderVal (a $a)
{
if ($a) {
echo $a->val;
}
}
renderVal (null);
A. A syntax error in the function declaration line
B. An error, because null is not an instance of 'a'
C. Nothing, because a null value is being passed to renderVal()
D. NULL
What is the name of the method that can be used to provide read access to virtual properties in a class?
A. __call()
B. __get()
C. __set()
D. __wakeup()
E. __fetch()
What is the length of a string returned by: md5(rand(), TRUE);
A. Depends on the value returned by rand() function
B. 32
C. 24
D. 16
E. 64
Which DOMElement property provides a reference to the list of the element's children?