200-550

200-550 practice questions, page 2 of 9, with answer review and explanations.

Question 6

Which of the following are valid identifiers? (Choose 3)

  1. function 4You() { }
  2. function _4You() { }
  3. function object() { }
  4. $1 = "Hello";
  5. $_1 = "Hello World";

Question 7

What super-global should be used to access information about uploaded files via a POST request?

  1. $_SERVER
  2. $_ENV
  3. $_POST
  4. $_FILES
  5. $_GET

Question 8

What is the difference between "print" and "echo"?

  1. There is no difference.
  2. Print has a return value, echo does not
  3. Echo has a return value, print does not
  4. Print buffers the output, while echo does not
  5. None of the above

Question 9

What is the output of the following code? echo "1" + 2 * "0x02";

  1. 1
  2. 3
  3. 5
  4. 20
  5. 7

Question 10

What is the result of the following bitwise operation in PHP? 1 ^ 2

  1. 1
  2. 3
  3. 2
  4. 4
  5. -1