No, this is not a law on the books in Pennsylvania.
Early in the 20th century, when cars were louder, less regulated in right of way, and comingled with horse drawn carriages, a group of farmers (calling themselves FAAS, Farmers Anti-Automobile Society) assembled to draft _proposed_ legislation that would prevent cars from spooking horses. One of these proposed laws was as quoted. Another was that a car approaching by night would send flares off at regular intervals to signal its arrival.
Concord Township Historical Society has a well-sourced description of these early attempts at regulation. See < for a more thorough description from a local.
The Vintage Automobile Association of America also discusses this in the broader context of early automobile laws, not just in Pennsylvania, and how early competitions worked to disprove the need for these kinds of laws. See <