Using XML as a source format gives the ability to generate many output formats from the source files, while only maintaining one source document for all formats. The tool used for formatting the online manual is » PhD. We use » Microsoft HTML Help Workshop to generate the Windows HTML Help format of the manual, and of course PHP itself to do some additional conversions and formatting.
The PHP manual is generated in various languages and formats, see » https://www.php.net/docs.php for additional details. The XML source code may be downloaded from git and viewed at » https://github.com/php/doc-en.