Tvrtko A. Urulin [1] provided an interesting patch for PHP that only touches two files (main/main.c and sapi/apache/mod_php4.c ), which will allow to disable PHP functions per virtual directory. Interesting feature for service providers and Universities.
[1] http://www.zend.com/lists/php-dev/200309/msg00120.html