If you wish to get the latest PHP source tree, you can obtain it through anonymous CVS. You should be warned that the CVS version is a development version, and as such, is often unstable, and may not even compile properly. The advantage of using CVS, though, is that you can get the latest fixes and updates, without having to wait for the official releases.
You can find more information about CVS, and download clients for most major platforms, at CVShome.org.
PHP 4 uses an advanced configuration system that requires you to have autoconf (2.13+), automake (1.4+), libtool (1.4+ [except 1.4.2]), bison (1.28+) and flex (2.5.4+) installed. All of the necessary utilities can be obtained from the GNU FTP site.
cvs -z3 update -d -P checkout -P diff -u
cvs -d :pserver:cvsread@cvs.php.net:/repository login
cvs -d :pserver:cvsread@cvs.php.net:/repository co php5
Note:
You can retrieve a specific release of PHP from CVS by using the -r flag in your cvs command. For example:cvs -d :pserver:cvsread@cvs.php.net:/repository co -r PHP_4_0_7 php4Tags for major releases look like php_VERSION where version is the version number with periods replaced with underscores.
Note:
Certain combinations of autoconf, automake and libtool may not work when used together.
See below for details.
Also, certain versions of autoconf may generate warnings of AC_PROG_CPP called before AC_PROG_CC. These messages can usually be ignored.
There are also other things, like the XML source code for the documentation, available via anonymous CVS. See the web-based view of the CVS server to see what is available, and substitute the appropriate name for "php5" in step 3 (and ignore the later steps).
You can also mirror the PHP CVS repository using CVSup. See here for more details.
autoconf, automake and libtool information
There seem to be problems with libtool 1.4.2. It is suggested that you use libtool 1.4, along with the autoconf 2.13 and automake 1.4. You should also ensure that autoconf, automake and libtool are installed in the same directory.
The following combinations are known to work: