214 quizzes found.

Which of the following values of $_GET['url'] would cause session fixation? Consider the following code:

<?phpheader("Location: {$_GET['url']}");?>
  1. Session Fixation is not possible with this code snippet
  2. http://www.zend.com/?PHPSESSID=123
  3. PHPSESSID%611243
  4. Set-Cookie%3A+PHPSESSID%611234
  5. http%3A%2F%2Fwww.zend.com%2F%0D%0ASet-Cookie%3A+PHPSESSID%611234

Choose 1 answers

When implementing a permissions system for your Web site, what should always be done with regards to the session?

  1. None of the above
  2. You should not implement permission systems using sessions
  3. Sessions should be cleared of all data and re-populated
  4. The session key should be regenerated
  5. The session should be destroyed

Choose 1 answers

Which of the following is not valid syntax for creating a new array key?

  1. $a[] = "value";
  2. $a{} = "value";
  3. $a[0] = "value";
  4. $a{0} = "value";
  5. $a[$b = 0] = "value";

Choose 1 answers

Which of the following functions will sort an array in ascending order by value, while preserving key associations?

  1. asort()
  2. usort()
  3. krsort()
  4. ksort()
  5. sort()

Choose 1 answers

What is the output of the following code block?

<?php$a = "The quick brown fox jumped over the lazy dog.";$b = array_map("strtoupper", explode(" ", $a));foreach($b as $value) {print "$value ";}?>
  1. THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG.
  2. A PHP Error
  3. Array Array Array Array Array Array Array Array Array

Choose 1 answers