PHP (PHP: Hypertext Preprocessor) is a web scripting language that was designed to allow for dynamic content on web pages. PHP code can be embedded into HTML to create dynamic web pages and produce them to the client in the form of a static HTML page.
PHP5 packages are available for most major distributions and can be installed using your distributions package manager.
apt-get (Debian based):
sudo apt-get install php5
or, if you plan to use PHP with Apache on Debian, then you should use
sudo apt-get install libapache2-mod-php5
yum (Red Hat Based):
yum install php
If you have a distribution other than the ones covered please check their documentation on how to install packages. If your distribution does not provide a package you can find the source at http://www.php.net/downloads.php