Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
bpicolo
9y ago
0 comments
Share
Dang, just like PHP (no built in set)
0 comments
default
newest
oldest
gravypod
9y ago
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