Assuming UTF-8 encoding, what is the value of $count? $count = strlen($data);
A. 0
B. 4
C. 5
D. 7
Which class of HTTP status codes is used for redirections?
A. 2XX
B. 3XX
C. 4XX
D. 5XX
Under what condition may HTTP headers be set from PHP if there is content echoed prior to the header function being used?
A. headers_sent() returns true
B. Output buffering is enabled
C. The client supports local buffering
D. The webserver uses preemptive mode
When retrieving data from URLs, what are valid ways to make sure all file_get_contents calls send a certain user agent string? (Choose 2)
A. $default_opts = array('http'=>array('user_agent'=>"My Cool Browser"));$default = stream_context_set_default($default_opts);
B. stream_context_set_option("user_agent", "My Cool Browser");
C. ini_set('user_agent', "My Cool Browser");
D. stream_context_set_option($context, "http", "user_agent", "My Cool Browser");
What is the name of the function that allows you register a set of functions that implement user-defined session handling?
A. session_set_handler()
B. session_set_storage_handler()
C. session_register_handler()
D. session_set_save_handler()
What DOM method is used to load HTML files?
A. load()
B. loadXML()
C. loadHTML()
D. loadHTMLFile()
Which of the following expressions will evaluate to a random value from an array below? $array = array("Sue","Mary","John","Anna");
A. array_rand($array);
B. array_rand($array, 1);
C. shuffle($array);
D. $array[array_rand($array)];
E. array_values($array, ARRAY_RANDOM);
Which elements does the array returned by the function pathinfo() contain?
A. root, dir, file
B. dirname, filename, fileextension
C. dirname, basename, extension
D. path, file
What is the output of the following code? echo 0x33, ' monkeys sit on ', 011, ' trees.';
A. 33 monkeys sit on 11 trees.
B. 51 monkeys sit on 9 trees.
C. monkeys sit on trees.
D. 0x33 monkeys sit on 011 trees.
The following form is loaded in a browser and submitted, with the checkbox activated:
In the server-side PHP code to deal with the form data, what is the value of $_POST['accept'] ?
A. accept
B. ok
C. true
D. on