Y
Hacker News
new
|
ask
|
show
|
jobs
by
bpicolo
3596 days ago
Dang, just like PHP (no built in set)
1 comments
gravypod
3595 days ago
And yet there is a generic in array function.
link
mappu
3595 days ago
...which is O(n). Unless the set is trivially small, better to coerce your data to key types and use array_key_exists().
link
gravypod
3595 days ago
I never said it was good, but it exists. Most of my PHP code utilizes kv arrays everywhere possible.
link