Which of the following will set a 10 seconds read timeout for a stream?
A. ini_set("default_socket_timeout", 10);
B. stream_read_timeout($stream, 10);
C. Specify the timeout as the 5th parameter to the fsockopen() function used to open a stream
D. stream_set_timeout($stream, 10);
E. None of the above
Given the following DateTime object, which sample will NOT alter the date to the value '2014-02-15'? $date = new DateTime('2014-03-15');
A. $date->sub(new DateInterval('P1M'));
B. $date->setDate(2014, 2, 15);
C. $date->modify('-1 month');
D. $date->diff(new DateInterval('-P1M'));
What is the output of the following code? var_dump(boolval(-1));
A. bool(true)
B. bool(false)
Type hinting in PHP allows the identification of the following variable types: (Choose 2)
A. String
B. Integer
C. Array
D. Any class or interface type
E. All of the above
Which of the following statements about PHP is false? (Choose 2)
A. A final class can be derived.
B. A final class may be instantiated.
C. A class with a final function may be derived.
D. Static functions can be final.
E. Properties can be final.
Which of the following filtering techniques prevents all cross-site scripting (XSS) vulnerabilities?
A. Strip all occurrences of the string