I am using the 4.0.2 version from php4win and I have tested the script in both CGI and ISAPI and both have the same results "Fatal error: Call to undefined function: getallheaders()". Another oddity is that the REMOTE_ADDR and REMOTE_HOST variables are blank in ISAPI but contain data in CGI.
Obviously, there's a difference, not only in performance, but in available variables between the two programs.