Tommy Pham’s second solo homer of the night came off Hector Neris in the ninth inning to tie the game at 5-5 and the Cardinals rallied  back from a 5-0 deficit to beat the Philadelphia Phillies 7-6 in 10 innings Wednesday night.

Jedd Gyorko hit a two-run homer and pinch-hitter Jose Martinez also connected for St. Louis who have won five straight against the worst team in baseball.

Cardinals starter Michael Wacha gave up five runs, two earned, on nine hits in four innings. Brett Cecil got the win in relief.

Phillies starter Nick Pivetta had a career-high 10 strikeouts and allowed three runs and four hits in six innings.