It is completely safe, as long as you play at an online casino that has been licensed by the Pennsylvania Gaming Control Board. Before granting a license to an online casino, they will first check and make sure the casino is fully above-board and is operating safely and legally.

On the other hand. there are many online casinos that will avoid being officially licensed, because it is expensive, so it is best to not spend real money in those unlicensed casinos.