macports is a widely used ports system for Mac OS. It’s repository contains hundreds of application that can be compiled and installed. The repository contains php 5.3. So if you want to run PHP from subversion you still have to compile it yourself and install it yourself outside your managed ports environment. I created a rather simple Portfile to build it from PHP’s trunk.
To use the php-trunk portsfile. Just extract the tarball into a directory and…
$ tar xzvf php-trunk-port.tar.gz
$ cd php-trunk-port
$ echo "file://`pwd`" > /opt/local/etc/macports/sources.conf
$ echo "file://`pwd`" >> /opt/local/etc/macports/sources.conf
$ port install php-trunk
And the best thing about the port: It compiles PHP with dtrace support :).
Please note the Portfile is very simple and is not tested with the additional modules provided by macports. So use it at your own risk and enhance it.
UPDATE: as philip noted, it should be >> instead of >.