Marc Liyanage has posted a precompiled version of the new PHP 4.1 for Mac OS X on his web site! (Check out his mouseover toolbar—the coolest one ever!)
I also managed to compile for myself a working PHP 4.1 with a few more features than Marc provides with his, notably the experimental multi-byte string functions (mb_string) to use PHP with UTF-8. This should be especially of interest to Japanese web designers and other "multi-byte" languages. UTF-8 is supported by nearly every version 2 or 3 browser and also backwards compatible with ASCII, which makes it more than an ideal web character encoding (until all operating systems fully support Unicode).
A PostgreSQL database can store UTF-8 data, so it is a suitable backend for web applications written to produce UTF-8 web pages.
I've also included some instructions on updating the PEAR support files in /System/Library/PHP for use with PHP 4.1. In the next week or so I will post some instructions on my web site how to successfully build PHP 4.1 on Mac OS X.
Read more about what's new in PHP 4.1 at the PHP home page.
(For the technically-inclined, my php 4.1 configure line reads as follows:)
./configure --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-inline-optimization --enable-magic-quotes --enable-mbstr-enc-trans --enable-mbstring --enable-pear --enable-posix --enable-safe-mode --enable-trans-sid --enable-wddx --enable-yp --infodir=/usr/local/share/info --localstatedir=/private/var --mandir=/usr/local/share/man --prefix=/usr/local --sysconfdir=/private/etc --with-apxs=/usr/sbin/apxs --with-bz2=/usr/local --with-config-file-path=/private/etc/httpd --with-curl=/usr/local --with-db --with-freetype-dir=/usr/local --with-gd=/usr/local --with-imagick=/usr/local --with-jpeg-dir=/usr/local --with-kerberos=/usr --with-mysql=/usr/local/mysql --with-openssl=/usr/local/ssl --with-pgsql=/usr/local/pgsql --with-png-dir=/usr/local --with-tiff-dir=/usr/local --with-xml --with-zlib=/usr/local