Police say the groups were at the Penn Treaty Park in the Fishtown section of the city, at around 1:30 Monday morning, long after the park was closed for the night.
An argument between them quickly escalated into a fight involving knives.
The five stabbing victims were taken to three hospitals in the city, including Saint Christopher's Hospital for Children.
The wounded are all in stable condition.
So far, police have not indicated what the argument was about, or why the two groups were in the park at that hour.
Officers have not said if they have made any arrests.