Here is the applicable law:
https://www.legis.state.pa.us/cfdocs/le ... &subsctn=0
§ 3315. Passing and overtaking streetcars.
(a) General rule.--Notwithstanding any other provision of this subchapter, the driver of a vehicle may not overtake and pass to the left of a streetcar proceeding in the same direction, whether the streetcar is actually in motion or temporarily halted to receive or discharge passengers, if overtaking or passing requires driving in a lane normally used by traffic moving in the opposite direction.
(b) Streetcar stopped to receive or discharge passengers.--The driver of a vehicle may not overtake and pass a streetcar which has stopped to receive or discharge passengers on the side on which passengers board or alight until the doors of the streetcar are closed and passengers who are discharged have reached the side of the highway.
(c) Applicability.--This section shall not be applicable to locations where streetcars are operating on tracks located within a median section of the roadway separated from the roadway by curbs or other physical barriers.
(May 11, 2006, P.L.159, No.37, eff. 60 days)