Showing posts with label tree. Show all posts
Showing posts with label tree. Show all posts

Monday, May 7, 2012

Are there alternative data structures than array in PHP, where I can benefit from different index techniques?


Lately I had an issue with an array that contained some hundred thousands of values and the only thing I wanted to do was to check whether a value was already present. In my case this were IPs from a webserver log. So basically something like: