consider this array:
$numbers = array (
'1' => 'one',
'2' => 'two',
'3' => 'three',
'4' => 'four',
'5' => 'five'
);
to check if the key '3' exists in this array you could write any one of the following three ways:
if (isset ($numbers['3']))
if (in_array ('3', array_keys ($numbers)))
if (array_key_exists ('3', $numbers))
Are they are performance issues for any of these three different approaches? Is one more optimised than the other? I realize with the example array the speed difference would be negligible but what about an array with hundreds of indexes?