I would go with the binary package (yum) rather than compiling from source. The maintainers of your Linux distro (I'm assuming RHEL/CentOS, since you're using yum) are much more familiar with that distro than you are, and therefore can choose the compile-time options that offer the best performance for that particular OS.
They will also often apply patches to their RPMs that fix OS-specific bugs and other issues. And, when a bugfix is found, applying those patches is as simple as "yum update". You should only compile from source when the binary package doesn't offer particular features that you need, and even then, grabbing the SRPM and changing its options is usually the best route.
You can of course compile your own version if: - you need more features/options than yum install php provides - you need the latest version of PHP5 . you have a decent GCC or other compiler - you have a newer CPU and you want to optimize your MySQL binaries for that model specifically ie. yum might install general i386 package, when your processor is i686 or AMD 64. - you know what you are doing - you need to to setup PHP into different paths than YUM installs