In California, it is legal as long as the seller agrees to it, and the information is shared with all offerers. Furthermore, if the seller doesn't want the amount of other offers disclosed, then they must put it in writing.
Go to the Pennsylvania Association of Realtor's website and see if they have a legal hotline for consumers. They should be able to tell you if it is legal in your state. If you can't get an answer there, call your local Association of Realtors.