lundi 29 juin 2015

switch statement having only one case

I only have one case in switch statement

switch ($coreName) {
    case 'stock':
        $result['website'] = ($result['website']) ? $websiteStatus[$result['website']] : "";
    break;
}

My question is this a good practice or shall I use an if statement for this? Any performance differences or anything?

Aucun commentaire:

Enregistrer un commentaire