CORRECT TEXT
Please provide the name of the super-global variable where all the information about cookies is available.
When tracking upload progress with sessions, the values of 2 INI settings are needed to determine the key in $_SESSION of the upload progress data. What are the INI settings? (Choose 2)
A. session.upload_progress.file
B. session.upload_progress.key
C. session.upload_progress.prefix
D. session.upload_progress.freq
E. session.upload_progress.name
Given a PHP value, which sample shows how to convert the value to JSON?
A. $string = json_encode($value);
B. $string = Json::encode($value);
C. $json = new Json($value); $string = $json->__toString();
D. $value = (object) $value; $string = $value->__toJson();
What is the difference between "print" and "echo"?
A. There is no difference.
B. Print has a return value, echo does not
C. Echo has a return value, print does not
D. Print buffers the output, while echo does not
E. None of the above
What is the return value of the following code?
strpos("me myself and I", "m", 2)
A. 2
B. 3
C. 4
D. 0
E. 1
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);
What is the difference between the spaceship operator (<=>) and the strcmp() function?
A. There is no difference in functionality
B. strcmp() returns a Boolean value, the spaceship operator a number
C. strcmp() does a case-intensive comparison, the spaceship operator does not
D. The spaceship operator returns -1, 0 or 1; strcmp() may return any integer
Which parts of the text are matched in the following regular expression?
$text = << The big bang bonged under the bung. EOT; preg_match_all('@b.n?g@', $text, $matches); A. bang bong bung B. bang bonged bung C. big bang bong bung D. big bang bung
Which of these statements about PDO is NOT true?
A. PDO has built-in support for Large Objects (LOBs).
B. Placeholders within PDO prepared statements need to be named.
C. When something goes wrong, PDO can throw an instance of its own exception class.
D. PDO does not emulate missing database features.
Which of the following will NOT instantiate a DateTime object with the current timestamp?
A. $date = new DateTime();
B. $date = new DateTime('@' . time());
C. $date = new DateTime('now');
D. $date = new DateTime(time());