src/ieu/Http/Request.php
public function getPort() : string
  {
      // Check for proxy first
      $port = self::server('HTTP_X_FORWARDED_PORT');
      if ($port) {
          return (string)$port;
      }

      $protocol = (string)self::server('HTTP_X_FORWARDED_PROTO');
      if ($protocol === 'https') {
          return '443';
      }

      return (string)self::server('SERVER_PORT');
  }
public function getPort() : string
  {
      // Check for proxy first
      $port = self::server('HTTP_X_FORWARDED_PORT');
      if ($port) {
          return (string)$port;
      }

      $protocol = (string)self::server('HTTP_X_FORWARDED_PROTO');
      if ($protocol === 'https') {
          return '443';
      }

      return (string)self::server('SERVER_PORT');
  }
public function getPort ( ) : string { // Check for proxy first
 $ port = self :: server ( 'HTTP_X_FORWARDED_PORT' ) ; if ( $ port ) { return ( string ) $ port ; } $ protocol = ( string ) self :: server ( 'HTTP_X_FORWARDED_PROTO' ) ; if ( $ protocol === 'https' ) { return '443' ; } return ( string ) self :: server ( 'SERVER_PORT' ) ; }
Get the port of this request as string.

@return string
Get the port of this request as string .