nerdexam
Zend

200-530 · Question #68

Which is the most efficient way to determine if a key is present in an array, assuming the array has no NULL values?

The correct answer is C. array_key_exists('key', $a). See the full explanation below for the reasoning.

Question

Which is the most efficient way to determine if a key is present in an array, assuming the array has no NULL values?

Options

  • Ain_array('key', array_keys($a))
  • Bisset($a['key'])
  • Carray_key_exists('key', $a)
  • DNone of the above

How the community answered

(23 responses)
  • A
    9% (2)
  • B
    13% (3)
  • C
    74% (17)
  • D
    4% (1)

Community Discussion

No community discussion yet for this question.

Full 200-530 Practice