Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
bpicolo
9y ago
0 comments
Save
Share
Dang, just like PHP (no built in set)
0 comments
3 comments · 1 top-level
top
newest
oldest
gravypod
9y ago
· 2 in thread
And yet there is a generic in array function.
mappu
9y ago
...which is O(n). Unless the set is trivially small, better to coerce your data to key types and use array_key_exists().
gravypod
9y ago
I never said it was good, but it exists. Most of my PHP code utilizes kv arrays everywhere possible.
j
/
k
navigate · click thread line to collapse