I'm an out-of-stater going to school in Philly and I was wondering how old you have to be to purchase a handgun in PA. I tried doing some searching but couldn't really find any clear laws listed online. I'm about to turn 20 and I live in a pretty sketchy area of the city. I've thought about it and I think I would feel much safer with a firearm. My main two questions are; (1) do you have to be 21 to purchase a handgun in PA, even if through a private party and (2) will there be any consequences stemming from the fact that I'm an out-of-state resident? Would I have to apply for PA residency?

Thanks.