Skip to content

Instantly share code, notes, and snippets.

@DASPRiD
Created December 5, 2011 20:20
Show Gist options
  • Save DASPRiD/1435184 to your computer and use it in GitHub Desktop.
Save DASPRiD/1435184 to your computer and use it in GitHub Desktop.
<?php
// Makes no sense insert comment after case A and B
switch ($foo) {
case 'a':
case 'b':
case 'c':
$bar = 'baz';
break;
}
// Here it makes sense, because it could be seen as bug
switch ($foo) {
case 'a':
$baz = 'baz';
// break intentionally omitted
case 'b':
case 'c':
$bar = 'baz';
break;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment