Actually, that is a misquote.
It would have been, "Set Phasers to stun."
You will hear this from Gene Roddenberry's Star Trek Universe.
In that context, a Phaser is an energy weapon capable of stunning the target on the 'Stun' setting and killing on higher settings. It is also capable of disintegrating matter and if the user wishes, can be made to detonate with an impressive exothermic reaction. The 'Stun' setting is a non-lethal setting.
Wholeman



