If December games are supposed to be a test for the Eagles and young quarterback Nick Foles, consider this exam passed.

Foles tossed three more touchdowns and broke a franchise record for most passes without an interception, and the defense produced three turnovers as the Eagles won 24-21 over the red-hot Cardinals at the Linc.

Chip Kelly won his first post-bye week game and the Eagles, winners of two straight at the Linc after a 10-game home losing streak dating back to last year, won their fourth straight game to keep pace with the Cowboys for first place in the NFC East.

Arizona had won four straight games coming into the showdown under first-year coach Bruce Arians and had scored at least 27 points in each game, including a 40-11 win last Sunday against the Colts.

Even with a second-half offensive slump -- 26 yards on their last four drives -- the Eagles rung up the fourth-most points this season against Cards defensive coordinator Todd Bowles, who was the Eagles’ defensive coordinator for all of 10 games last year.

The Eagles have now scored 24 points in each of their past four games, each one started by Foles, who wasn’t officially named starter until last week.

Foles turned a strip-sack by Trent Cole deep in Arizona territory into a first-possession touchdown pass to Zach Ertz and led a nine-play, 78-yard drive in the second quarter that ended with a 1-yard TD pass to Brent Celek with 19 seconds left. Foles then marched the offense 80 yards on 13 plays to start the third quarter and hit Ertz on a 24-yard touchdown post that inflated the Eagles’ lead to 24-7.

But the Eagles have had problems holding big leads all year, and they did again. Their next three possessions netted minus-one yard and they went four straight drives without scoring a point. The Cards got touchdown passes from Carson Palmer to Michael Floyd and Jim Dray to close within three and had the ball and first down at their own 10-yard line with slightly more than two minutes to play.

The Cards also had Palmer, who can be pinpoint accurate on one pass and scattershot on another. He badly missed a wide open Andre Roberts on 3rd-and-5, then had his fourth-down pass to Floyd broken up (somewhat illegally) by Bradley Fletcher.