Tinuviel is completely right, but as a reference:
You can compile some extensions as a shared library..
$ tar -xvzf php-4.0.x.tar.gz
$ cd php-4.0.x
$ ./configure --with-zlib=shared
$ cd ext/zlib
$ make
$ cp .libs/zlib.so ~/php_modules/
(Yes, usually a normal user can compile php like that in his home directory)
You can then load it with the dl() function
http://uk.php.net/dl
<?php
dl('zlib.so');
echo gz_compress('whatever');
/ well, you don't REALLY want to do that :-) /
?>
I had some problems with dl() not taking relative paths,
but I figure that's cos its some 4.0.5-dev version atm 🙂
Beware: this function is a huge performance killer.
Good luck!
-- Mathieu