In any case, we have both TOS and DS9 references to phaser settings that aren't integer values, suggesting that the quality being set might be something as linear and continuous as output power (and thus probably something the user adjusts using the roll control of the TOS weapons, or the button combinations manifesting as shrinking and growing LED bars in the TNG sidearms).
Things like "stun", "kill" and "disintegrate" might be specific parts of that continuum - or they could be a completely different category of settings, so that one can choose "kill" and any setting between zero and maximum, or then "stun" and any setting between zero and maximum. There is support for both views, but perhaps more for the latter, mainly because there are numerous occasions where we have reason to believe a phaser is at a low setting (dialogue, or seamless action from a preceding scene where low settings were manifest) yet manages to create significant heat or material destruction.
Like CorporalCaptain, I prefer to think that the stun mechanism is quite fundamentally different from the disintegration mechanism, as disintegration appears so obviously irreversible yet stun is harmless unless repeated a lot and frequently. Indeed, I'd like to think the average phaser gun has two (or, with Pike, three) separate guns built into one and the same casing, with closely co-located barrels. The TOS barrel has a dish and a spike coaxially; one could be the kill barrel, the other the stun barrel. The TMP weapon is seen firing four narrow beams in parallel; each of the four barrels might provide a different beam, and different combinations could provide different effects, a mixture of all four being "white noise" that kills by heating as seen when Kirk barbeques the Ceti eel. Guns from TNG onwards would have "high tech" barrels where the numerous internal mechanisms can all fire through one and the same emitter...
Timo Saloniemi