I use getallheaders() instead of apache_request_headers() because:
5.5.7 	This function became available in the CLI server.
5.4.0 	This function became available under FastCGI. Previously, it was supported only when PHP was installed as an Apache module.

and I don't know it is still alias of apache_request_headers() or not