Re: What's faster using if else or arrays?
| From: | Stuart Dallas | Date: | Sat, 30 Apr 2011 13:20:19 +0000 |
| Subject: | Re: What's faster using if else or arrays? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312589@lists.php.net to get a copy of this message | ||
On Saturday, 30 April 2011 at 03:17, Tamara Temple wrote:
> On Apr 29, 2011, at 8:32 AM, Robert Cummings wrote:
>
> > On 11-04-29 08:04 AM, Steve Staples wrote:
> > > On Thu, 2011-04-28 at 19:19 -0400, Robert Cummings wrote:
> > > > On 11-04-28 06:37 PM, dholmes1031@gmail.com wrote:
> > > > > Thanks switch and case seems to be more faster for the job and a
> > > > > lot cleaner
> > > > > ------Original Message------
> > > > > From: Andre Polykanine
> > > > > To: dholmes1031@gmail.com
> > > > > Cc: php-general@lists.php.net
> > > > > Subject: Re: [PHP] What's faster using if else or arrays?
> > > > > Sent: Apr 28, 2011 6:17 PM
> > > > >
> > > > > Hello Dholmes1031,
> > > > >
> > > > > I would write it like this:
> > > > > switch($foo) {
> > > > > case 5: $dothis; break;
> > > > > case 3: $dothat; break;
> > > > > default: $donothing; break;
> > > > > }
> > > >
> > > > This sounds like a job for *dun dun dun* GOTO!
> > > >
> > > > Kidding, of course ;)
> > > >
> > > > Cheers,
> > > > Rob.
> > > > --
> > >
> > > you should be removed and banned from this list for even just
> > > THINKING
> > > about using a GOTO! :P
> > >
> > > (yes, there are still *SOME* (and i use that loosely) benefits to the
> > > GOTO command, but in reality, no.)
>
> People, people, don't you realize that break IS a goto?? It's just one
> of limited scope.
By that logic, so is a function call.
Hey, hey... what do you call a group of gotos?
.
.
.
A CLASS!! Bwhahahahahahahahahaaaaa. Not!
Happy Saturday all :)
-Stuart
--
Stuart Dallas
3ft9 Ltd
http://3ft9.com/