note 60163 added to control-structures.switch
| From: | php-general at lists dot php dot net | Date: | Wed, 28 Dec 2005 14:38:29 +0000 |
| Subject: | note 60163 added to control-structures.switch | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-100854@lists.php.net to get a copy of this message | ||
Just a short question. I often see things like this in OpenSource
<?php
...
case x:
...
return $var;
break;
case y:
...
?>
Is the break really needed? the return is like a break with a returning variable, isn't it?
----
Manual Page -- http://www.php.net/manual/en/control-structures.switch.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60163
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60163&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60163&report=yes
Search -- http://master.php.net/manage/user-notes.php