While researching how to detect null values in an array, I came across some user's comment under the http://www.php.net/manual/en/function.array-key-exists.php manual page.
It said that
if (isset(..) || array_key_exists(...))
{
...
}
is faster than doing
if array_key_exists(...))
{
...
}
The bench marks posted for 100000 runs were
array_key_exists() : 205 ms
is_set() : 35ms
isset() || array_key_exists() : 48ms
My question:
Is (isset(..) || array_key_exists(...))
faster than array_key_exists()
?
If so, why?
EDIT: In writing out this question I think I found my answer. I've decided to post the question anyway to see if my thinking is correct.