Do we actually need to distinguish between an array key that does not exist and a null value for the key? If not, isset could be used instead of array_key_exists (it's slightly faster :p).