It was the 26-year-old’s fourth five-wicket haul in his first three tests.
Only Thilan Samaraweera, who top-scored with 32, and lower-order batsmen Kaushal Silva (17), Thisara Perera (21) and Rangana Herath (23) showed any resistance as the home attack sped through the Sri Lankan batting line-up.
Wicketkeeper Mark Boucher took six catches as the South African bowlers zipped the ball around the edges of the bat in helpful conditions.
Sri Lanka had collapsed to 38 for four by lunch, but the middle order dug in before South Africa’s charge to victory gathered momentum again when Dale Steyn (2-36) and Philander returned to the attack.
Philander claimed the wicket of Angelo Mathews for five with a superb delivery that nipped away from back-of-a-length, found the edge of the bat and Boucher took a good catch.
Lanky fast bowler Morne Morkel had Samaraweera caught by Boucher in the next over with one of the few deliveries he managed to get on target.
Philander then wrapped up the innings with deliveries that obtained extra bounce to dismiss Chanaka Welegedara and Herath.
After South Africa had batted for four overs on the third morning, taking their first innings total to 411 all out, Philander struck twice with the new ball.
He dismissed captain Tillakaratne Dilshan (6) in the fourth over and then Kumar Sangakkara for two as Sri Lanka showed little confidence on a pitch that offered both seam and bounce.
Mahela Jayawardene, Sri Lanka’s leading run-scorer, suffered the heartbreak of being stranded one short of 10,000 test runs when he was run out for 15 in his 126th test.
Jayawardene had defended a lively delivery from Jacques Kallis back down the pitch when partner Samaraweera called for an unlikely single.
With the rules no longer allowing Jayawardene to change direction and run in front of the stumps, the quick-thinking Kallis was able to throw down the wickets at the bowler’s end.
Earlier, Boucher had completed his first half-century in 18 months to relieve some of the pressure on him.
He finished with 65 as he and Imran Tahir (29 not out) extended their last-wicket stand to 61, South Africa’s best against Sri Lanka and highest at Centurion.