Phillies beat Cardinals 5-3 in 10 innings