Pennsylvania law allows a defense to homicide for the use of deadly force under very specific circumstances:

The use of deadly force is not justifiable unless the actor believes that such force is necessary to protect himself against death, serious bodily injury, kidnapping, or sexual intercourse compelled by force or threat; nor is it justifiable if the actor with the intent of causing death or serious bodily injury provoked the use of force against himself in the same encounter.