This question was answered by @zhunsakeuwyo:
If this were ubuntu this wouldn’t be a problem, Centos is a little bit more difficult. Centos is a clone of the red had source code which removes all branding of Redhat. Redhat’s main selling point is stability. In order to achieve this stability Redhat tries to reduce package update and back ports security fixes. Even if you could get 5.4 it might turn into a dependency nightmare. Having said that there is a tutorial on the superusers site that may help you out. WARNING They are using a fedora repo, this may drastically reduce stability on your system (or it might not) But again I don’t recommend it unless you absolutely cannot live without it. even then I would snapshot your droplet first just in case. http://superuser.com/questions/615401/upgrading-php-5-3-3-to-5-4-4-in-centos-6-4
Look under the solution part. Hope this helps!
View the original comment