At the Wanderers stadium, Zaheer and Ishant picked up the last four wickets for just 31 runs, as the Proteas crashed from their overnight score of 213/6 to be bowled out for 244 in less than an hour of the opening session on day three.
They now trail India by 36 runs, who made 280 runs in their first innings.
Zaheer finished with 4-88 from 26.3 overs, while Ishant returned with figures of 4-79 from 25 overs. Mohammad Shami was the other wicket-taker with figures of 18-3-48-2. R Ashwin (0-25) only bowled six overs out of a total 75.3 sent down.
Philander started the day with a boundary off the first ball, driving him through the covers and bringing up his fifty. He scored 52 off 77 balls, with six fours. He drove for four again two balls later, making his intent for quick runs very clear.
More From This Section
But he couldn't go on for long, edging Zaheer to first slip, as the left-arm speedster came round the wicket.
R Ashwin, who had dropped Graeme Smith on day two, didn't make any mistake this time around. Philander was out for 59 runs, facing 86 balls, hitting seven fours.
Morne Morkel was the last man out in the 76th over of the innings, bowled by Zaheer, after he had slapped him for four on the previous delivery. It folded the Proteas' innings 36 runs short of India's first innings total.
On day one, Virat Kohli's fifth Test hundred, 119 off 181 balls, had powered India to 280 in their first innings.