Narrative:

After initial climb out (after taking off from pne) I turned west on heading and maintained 1800 to stay under 2000 ft class B airspace. I received a traffic warning from both the onboard nav system and by my ipad connected with an adsb receiver (stratus 2). The traffic was converging from a 5 o'clock position; placing it out of sight under my right wing; and the traffic system information showed it to be climbing to my altitude. I immediately turned left and climbed to reduce the rate of closure to try to get out of the way. The aircraft; a helicopter; passed directly beneath me at roughly 200 feet of vertical separation. After the danger had passed I realized I had strayed into the phl class B airspace. I was at 2400 ft in the 7000/2000 ring. I reduced my altitude immediately and proceeded directly out of the airspace on a northwesterly course.

Google
 

Original NASA ASRS Text

Title: PA-28 pilot reported a NMAC with a helicopter. While maneuvering to avoid a collision; they strayed into PHL Class B airspace.

Narrative: After initial climb out (after taking off from PNE) I turned west on heading and maintained 1800 to stay under 2000 ft Class B airspace. I received a traffic warning from both the onboard nav system and by my iPad connected with an ADSB receiver (Stratus 2). The traffic was converging from a 5 o'clock position; placing it out of sight under my right wing; and the traffic system information showed it to be climbing to my altitude. I immediately turned left and climbed to reduce the rate of closure to try to get out of the way. The aircraft; a helicopter; passed directly beneath me at roughly 200 feet of vertical separation. After the danger had passed I realized I had strayed into the PHL class B airspace. I was at 2400 ft in the 7000/2000 ring. I reduced my altitude immediately and proceeded directly out of the airspace on a northwesterly course.

Data retrieved from NASA's ASRS site and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.