I have a largish array of string that I want to use as a look-up.
I am using in_array(), but I suspect its doing a simple loop through - does anyone know whether the in_array() algo uses a bsearch algo?
in_array() is O(n).
Also see List of Big-O for PHP functions
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With