Between array_key_exists
and isset
, though both are very fast [O(1)]
, isset
is significantly faster. If this check is happening many thousands of times, you'd want to use isset
.
It should be noted that they are not identical, though -- when the array key exists but the value is null
, isset
will return false
and array_key_exists
will return true
. If the value may be null
, you need to use array_key_exists
.