$operation = "+"; $a = 66; $b = 13; switch ($operation) { default : $c = 0; case "+": $c = $a + $b; case "-": $c = $a - $b; } echo $c;