Conditional checks against a list
Posted
by
AnnaSexyChick
on Programmers
See other posts from Programmers
or by AnnaSexyChick
Published on 2012-04-13T16:07:21Z
Indexed on
2012/04/13
17:42 UTC
Read the original article
Hit count: 149
php
|conditions
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
© Programmers or respective owner