On Fri, 2008-09-12 at 10:58 +0100, Luke wrote:
> I wonder if this is a shared trait between C and PHP (since I understand PHP
> is written in C) that the break; and the default: are placed for good
> practice in all switch statements since they prevent memory leaks?

Prevent memory leaks? WHAT?

Even if that were an issue, implementation of switch in PHP does not
look like a switch.

Breaks are used to prevent fall through to the next case condition.
Default is used as a catch-all... if you need a catch-all. It is
perfectly valid for a case statement to fall through to the next case
statement if the code can be shared.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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

Reply via email to