3 ms·And yet there is a generic in array function.by gravypod 10y agoAnd yet there is a generic in array function.mappu 10y 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 10y agoI never said it was good, but it exists. Most of my PHP code utilizes kv arrays everywhere possible.