Here are the pertinent articles of the Pennsylvania law regarding the use of force for self protection. An interesting specific difference between Pennsylvania law and Texas law is that Texas law explicitly permits the defense of others while Pennsylvania law rather clearly permits a person to defend only himself.
TITLE 18, CRIMES AND OFFENSES
PART I. PRELIMINARY PROVISIONS
Chapter 5. General Principles of Justification
§ 505. Use of force in self-protection.
(a) Use of force justifiable for protection of the person.–The use of force upon or toward another person is justifiable when the actor believes that such force is immediately necessary for the purpose of protecting himself against the use of unlawful force by such other person on the present occasion.
....
(2) The use of deadly force is not justifiable under this section 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:
(i) the actor, with the intent of causing death or serious bodily injury, provoked the use of force against himself in the same encounter; or
(ii) the actor knows that he can avoid the necessity of using such force with complete safety by retreating, except the actor is not obliged to retreat from his dwelling or place of work, unless he was the initial aggressor or is assailed in his place of work by another person whose place of work the actor knows it to be.