Has anyone solved the problem of the differing variables available with the all the possible combinations of IIS, Apache and CGI, SAPI ?

I've seen http://koivi.com/apache-iis-php-server-array.php but its sadly lacking in if/how to fill in the partially supported keys.

Something like this..

class ServerVariables implements ArrayAccess, IteratorAggregate { }
class IISServerVariables extends ServerVariables { }
class ApacheServerVariables extends ServerVariables { }

so can use offsetGet() to provide a more consistent view.