The Docbook XML sources of the documentation are hosted on php.net's CVS server in the peardoc module.
The checkout process is relatively simple:
$ cvs -d :pserver:<user>@cvs.php.net:/repository login
$ cvs -d :pserver:<user>@cvs.php.net:/repository co
Details about this process as well as anonymous login data can be found on php.net's CVS page.
Note: You need rights for the peardoc CVS module to be able to commit. Along with pear karma, every developer should have gotten the appropriate rights to peardoc. This is how it should be in theory, but one will probably have to send a mail to email@example.com asking for documentation karma.