PHP 5 comes bundled with Mac OS X 10.5 Leopard, but it is not active in the default configuration of Apache (enable Apache through System Preferences » Sharing » Web Sharing).

Enabling this module requires editing the Apache httpd.conf configuration file:

sudo pico /etc/apache2/httpd.conf

uncommenting the php5_module line:

LoadModule php5_module        libexec/apache2/libphp5.so

and restarting your Apache webserver:

sudo apachectl restart

Please note that PHP comes with limited features in Leopard (no GD module) and the only way to enable these modules is by compiling PHP from source. entropy.ch maintains PHP5 packages for Mac OS X.