something interesting about isset and array_key_exists
11 Jan
2006
11 Jan
'06
9:01 p.m.
Hi! As you might know, isset is preferred over array_key_exists because isset being a language construct it's a lot faster. I was under the impression that isset($array['foo']) and array_key_exists('foo', $array) is the same all the time. However, it's not. Yes, that's documented in the PHP manual but I think it's worth mentioning because we are now working with arrays a lot more: isset() does not return TRUE for array keys that correspond to a NULL value, while array_key_exists() does. Regards NK
7466
Age (days ago)
7466
Last active (days ago)
0 comments
1 participants
participants (1)
-
Karoly Negyesi