Under Preparations, there is this note:
"Note: If you always want PHP extensions compiled for the last stable PHP version, you can skip the first step."
However, it is not always true that the default PHP_TARGETS value provided by the PHP team is actually equal to the latest stable version of dev-lang/php. Saying "last stable PHP version" is a bit confusing here IMO; as of 2012-08-25 latest stable was 5.4 but the default target for extensions was still 5.3.
Code listing 3.4 is very complicated (and wrong? the egrep should not have "-v" because that gives all the stuff that's not extensions). According to olemarkus in #gentoo-php, it's sufficient to just do a newuse as PHP_TARGETS is USE-expanded, so any affected extensions will be rebuilt.
The paragraph above code listing 3.4 states, in its last sentence, "The php team has provided a minor version slotting compatible version of every package in the dev-php5 category.". Category dev-php5 no longer exists.
Moved to wiki. So this no longer applies.