nerdexam
Zend

200-530 · Question #23

What will be the output of the following code snippet? <?php $input = array(4, "4", "3", 4, 3, "3", 3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7); echo count(array_unique($input)); ?> Zend 200-530 Exam

The correct answer is C. 4. See the full explanation below for the reasoning.

Question

What will be the output of the following code snippet? <?php $input = array(4, "4", "3", 4, 3, "3", 3, 3, 3, 3, 3, 5, 5, 5, 5, 7, 7, 7, 7); echo count(array_unique($input)); ?> Zend 200-530 Exam

Exhibit

200-530 question #23 exhibit

Options

  • A19
  • B6
  • C4
  • DThe script will throw an error message

How the community answered

(24 responses)
  • A
    13% (3)
  • B
    4% (1)
  • C
    79% (19)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice