How do the follwing two function calls compare:
isset($a['key'])
array_key_exists('key', $a)
How do the follwing two function calls compare:
isset($a['key'])
array_key_exists('key', $a)
Literally, both do the same there in your code. But note that isset can be used for any variable whereas array_key_exists is used with arrays only.
Function isset() is faster, check http://www.php.net/manual/en/function.array-key-exists.php#82867
The two are not exactly the same. I couldn't remember the exact differences, but they are outlined very well in http://stackoverflow.com/questions/700227/whats-quicker-and-better-to-determine-if-an-array-key-exists-in-php.
The common consensus seems to be to use isset whenever possible, because it is a language construct and therefore faster. However, the differences should be outlined above.
array_key_exists will definitely tell you if a key exists in an array, whereas isset will only return true if the key/variable exists and is not null.
$a = array('key1' => 'フーバー', 'key2' => null);
isset($a['key1']); // true
array_key_exists('key1', $a); // true
isset($a['key2']); // false
array_key_exists('key2', $a); // true