Your not making any sense. Are you saying what is commited does not work? There is no difference, the udp case gets hit for tcp *OR* udp since there is no break.
Watch this example program:
<?php
$protocol = "tcp";
switch($protocol) {
case "tcp":
case "udp":
echo "case met";
}
?>
# php -f test.php
case met#
As you can see since there is no break, the case "udp" gets processed for either.
Now consider this:
<?php
$protocol = "udp";
switch($protocol) {
case "tcp":
case "udp":
echo "case met";
}
?>
# php -f test.php
case met#
As you can see you do not need to do it your way.