Re: [PHP] Re: switch case - to require the break statements seems strange to me

2008-08-31 Thread Lupus Michaelis
Diogo Neves a écrit : Hi, Well, I see a good reason anyway... U can have a lot of entry points and only one to exit... Like: I misunderstood the question :-/ I read Govinda had a strange behavior that ignore the break :-D -- Mickaël Wolff aka Lupus Michaelis http://lupusmic.org -- PHP Ge

Re: [PHP] Re: switch case - to require the break statements seems strange to me

2008-08-31 Thread Diogo Neves
Hi, Well, I see a good reason anyway... U can have a lot of entry points and only one to exit... Like: switch ($i) { case 0: echo "\$i < 1"; case 1: echo "\$i < 2"; case 2: echo "\$i < 3"; default: echo "\$i > 2"; } Or switch ($i) { case 0: case 1: case 2: echo "\$i < 3"; brea