final public static function getServerInfo(string $infoname):string
    {
        switch ($infoname) {
            case 'PHP_VERSION':
                $rs = phpversion();
                break;
            default:
                try {
                    $rs = $_SERVER[$infoname];
                } catch (\Exception $e) {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "Core Error: The server info $infoname does not exist", "solution" => "Check your keyword")));
                }
                break;
        }
        return ($rs);
    }
final public static function getServerInfo(string $infoname):string
    {
        switch ($infoname) {
            case 'PHP_VERSION':
                $rs = phpversion();
                break;
            default:
                try {
                    $rs = $_SERVER[$infoname];
                } catch (\Exception $e) {
                    throw new Server500(new \ArrayObject(array("explain" =>
                        "Core Error: The server info $infoname does not exist", "solution" => "Check your keyword")));
                }
                break;
        }
        return ($rs);
    }
final public static function getServerInfo ( string $ infoname ) : string { switch ( $ infoname ) { case 'PHP_VERSION' : $ rs = phpversion ( ) ; break ; default : try { $ rs = $ _SERVER [ $ infoname ] ; } catch ( \ Exception $ e ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Core Error: The server info $infoname does not exist" , "solution" => "Check your keyword" ) ) ) ; } break ; } return ( $ rs ) ; }
Get info about current server
@param string $infoname info name
@return string info result
@throws Server500 Error generate
Get info about current server