Re: if/elseif/else v. switch

From: Date: Sat, 05 Jun 2004 09:03:58 +0000
Subject: Re: if/elseif/else v. switch
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-187663@lists.php.net to get a copy of this message
This appears to be a really, really stupid question. If they are indentical in operation, then ofcourse there will be no noticeable difference to the user. One may note that a switch statement is faster, because the condition is only evaluated once. However you did not ask about the speed difference. "Dennis Seavers" <deseavers@mindspring.com> wrote in message news:410-220046655396940@mindspring.com... > Is there any noticeable difference (on the part of the client) between identical conditionals, one written as a switch, the other written as an if, elseif ... else conditional? I realize that one programmer coming in behind another might prefer the gentler layout of a switch; but would there be any perceivable difference, client-side, between the options?

« previous php.general (#187663) next »