One good example is that CentOS 5.2 comes with PHP 5.1. However many web developers have moved to PHP 5.2 and this is available in the testing repo. Below is one command to upgrade the existing PHP.
Step 1: Switch to root.
Step 2: Add the testing repo
# cd /etc/yum.repos.d
# wget http://dev.centos.org/centos/5/CentOS-Testing.repo
This will containg the following:
Step 3: Update PHP.
yum --en=c5-testing update php*