PrepAway - Latest Free Exam Questions & Answers

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

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

PrepAway - Latest Free Exam Questions & Answers

A.
in_array(‘key’, array_keys($a))

B.
isset($a[‘key’])

C.
array_key_exists(‘key’, $a)

D.
None of the above


Leave a Reply

Your email address will not be published. Required fields are marked *