Avoid a bit of call_user_func_array overhead with a switch.