Wikipedia calls it weak castle doctrine law:
Link Removed (18 Pa. Cons. Stat. § 505 on the defense of self says there is no obligation to retreat from the home or workplace unless the actor was the initial aggressor or, in the latter case, set upon by a co-worker; however, "surrendering possession of a thing to a person asserting a claim of right thereto" and "complying with a demand that [one] abstain from any action which [one] has no duty to take" are listed in addition to retreating as avenues which, if open to the actor but not taken, invalidate justification for the use of deadly force. Deadly force itself 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." Link Removed allows the use of deadly force if the actor believes there has been an unlawful entry into his or her dwelling and believes that nothing less than deadly force will end the incursion; if the person on the receiving end of the deadly force is "attempting to dispossess [the actor] of his dwelling otherwise than under a claim of right to its possession;" or if deadly force is the only thing that will prevent a felony from being committed in the dwelling. In any of those cases, the property owner must first ask the interloper to desist — unless the owner believes that doing so would be "useless," "dangerous," or would result in the property being defended coming to substantial harm before the request to desist could be effectively communicated.