Foster added an assist for a 3-point game while Alexei Ponikarovsky and Danius Zubrus each notched a goal and an assist for the Devils.
Zach Parise also scored in the victory.
Johan Hedberg made 17 saves through the first two periods but then surrendered 4 goals on 24 shots in the final frame.
Sergei Bobrovsky started in net for the Flyers but was pulled early in the second period after yielding 6 goals on 23 shots. Ilya Bryzgalov relieved and turned aside all eight shots he saw the rest of the way.
Celebrity Breakups and divorces of 2014 [PHOTOS]