Conditional checks against a list
- by AnnaSexyChick
I was wondering how computers do this.
The most logical way I can think is that they are iterating trough all elements of the list until they find one that matches the condition :)
For example if you call function_exists(), PHP should iterate trough all defined functions until it meets the one that matches the name you're looking for.
Is this true that this is the only way? If it is, it sounds like it's not very efficient :s