It happened around 11:30 p.m. Friday on the 5700 block of Filbert Street.
Police said the shooter fired at least four shots then ran away.
The 21-year-old victim was taken to Lankenau Medical Center.
He is listed in stable condition.
No arrests have been made.