After running this sort, what will be the value of $b?
$a = array('_!', 'def', 0);
$b = sort($a);
What super-global should be used to access information about uploaded files via a POST request?
An HTML form has two buttons. After submitting the form, how could you determine with PHP which button was clicked?
What piece of code would you use to obtain an array of response headers for a given URL, indexed by their respective names?
A script residing at http://example.com/phpcert/cookies.php contains the following code:
1
2 setcookie('name1', 'value1', time() + 60*60*24, '/');
3 setcookie('name1', 'value2');
4 ?>
The web browser is configured to accept all cookies. How many cookies will be set by this script?
You want to present the following formatted number: "999.000.000,00". Which function call is correct?
What function can reverse the order of values in an array without the loss of key information?
Which of these protocols are NOT governed by the W3C in their latest versions? (Choose 2)
You want to extract the pieces of a date string, which looks like this:
"2005-11-02". Which of the following pieces of code will properly assign $year,
$month and $day with their respective values?
How can the id attribute of the 2nd baz element from the XML string below be retrieved from the SimpleXML object found inside $xml?
Which of the following statements is NOT true?
a) Class constants are public
b) Class constants are being inherited
c) Class constants can omit initialization (default to NULL)
d) Class constants can be initialized by consts
Which of the following statements about database connections are commonly true? (Choose 2)
How can the line on which HTTP headers were sent inside a script be determined?
Given the following array:
$a = array(28, 15, 77, 43);
Which function will remove the value 28 from $a?
Which of the following filtering techniques prevents cross-site scripting (XSS) vulnerabilities?
After performing the following operations:
$a = array('a', 'b', 'c');
$a = array_keys(array_flip($a));
What will be the value of $a?
What is the output of the following code?
1
2 for ($i = 0; $i < 1.02; $i += 0.17) {
3 $a[$i] = $i;
4 }
5 echo count($a);
6 ?>
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 site layout. Which function do you apply to the text, when displaying it? (Choose 2)
Which of the following encryption standards provides symmetric key encryption? (Choose 2)
Which of the following functions are used to escape data within the context of HTML?
(Choose 2)
Given the following code, what is correct?
function f(stdClass &$x = NULL) { $x = 42;
}
$z = new stdClass;
f($z);
var_dump($z);
Which of the following code snippets writes the content of the “source.txt” to “target.txt”?