Which of the following can NOT be used to send a cookie from within a PHP application?
Answer : B
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)
Answer : A, C
Which of the following is NOT true about PHP traits? (Choose 2)
Answer : B, E
What content-type is required when sending an HTTP POST using JavaScript to ensure that PHP can access the data?
Answer : A
Which of the following parts must a XML document have in order to be well-formed?
Answer : B
How should class MyObject be defined for the following code to work properly? Assume $array is an array and MyObject is a user-defined class.
$obj = new MyObject();
array_walk($array, $obj);
Answer : D
What is the output of the following code?
function increment ($val)
{
$_GET['m'] = (int) $_GET['m'] + 1;
}
$_GET['m'] = 1;
echo $_GET['m'];
See Below Explanation:
Answer : A