Now Now children ...

It is always worth remembering that for some posters English is not their first language and therefore while a question may sound silly, there may be perfectly good reasons for it being asked.

Always answer the bits that fit between the lines, that is usually the real question.

Returning to the question :)

If a case statement can be created with a switch, then that should be faster than a string of if then's, but I have seen compilers converting a set of switch values to a string of if then statement like checks. So internally there may well be no difference what so ever! But where a number of conditions need checking, then the result may not be practical with a simple switch anyway.

So the question is possibly - does a case statement switch get processed as a set of goto statements, or a list of equality checks? It makes no difference to the client, but would have an effect on processing times and perhaps the order of segments could be adjusted to account for the most likely state first.

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to