original_string: private static function getFopen()
      {
          if (\count($args = func_get_args()) === 1) {
              $args = $args[0];
          }
  
          $uri      = $args[0];
          $options  = $args[1] ?? [];
          $callback = $args[2] ?? null;
  
          if ($callback) {
              $options['fopen']['notification'] = ['self', 'progress'];
          }
  
          if (isset($options['fopen']['ssl'])) {
              $ssl = $options['fopen']['ssl'];
              unset($options['fopen']['ssl']);
  
              $stream  = stream_context_create([
                  'http' => $options['fopen'],
                  'ssl' => $ssl
              ], $options['fopen']);
          } else {
              $stream  = stream_context_create(['http' => $options['fopen']], $options['fopen']);
          }
  
  
          $content = @file_get_contents($uri, false, $stream);
  
          if ($content === false) {
              $code = null;
              // Function file_get_contents() creates local variable $http_response_header, check it
              if (isset($http_response_header)) {
                  $code = explode(' ', $http_response_header[0] ?? '')[1] ?? null;
              }
  
              switch ($code) {
                  case '404':
                      throw new \RuntimeException('Page not found');
                  case '401':
                      throw new \RuntimeException('Invalid LICENSE');
                  default:
                      throw new \RuntimeException("Error while trying to download (code: {$code}): {$uri}\n");
              }
          }
  
          return $content;
      }
code: private static function getFopen()
      {
          if (\count($args = func_get_args()) === 1) {
              $args = $args[0];
          }
  
          $uri      = $args[0];
          $options  = $args[1] ?? [];
          $callback = $args[2] ?? null;
  
          if ($callback) {
              $options['fopen']['notification'] = ['self', 'progress'];
          }
  
          if (isset($options['fopen']['ssl'])) {
              $ssl = $options['fopen']['ssl'];
              unset($options['fopen']['ssl']);
  
              $stream  = stream_context_create([
                  'http' => $options['fopen'],
                  'ssl' => $ssl
              ], $options['fopen']);
          } else {
              $stream  = stream_context_create(['http' => $options['fopen']], $options['fopen']);
          }
  
  
          $content = @file_get_contents($uri, false, $stream);
  
          if ($content === false) {
              $code = null;
              // Function file_get_contents() creates local variable $http_response_header, check it
              if (isset($http_response_header)) {
                  $code = explode(' ', $http_response_header[0] ?? '')[1] ?? null;
              }
  
              switch ($code) {
                  case '404':
                      throw new \RuntimeException('Page not found');
                  case '401':
                      throw new \RuntimeException('Invalid LICENSE');
                  default:
                      throw new \RuntimeException("Error while trying to download (code: {$code}): {$uri}\n");
              }
          }
  
          return $content;
      }
code_tokens: private static function getFopen ( ) { if ( \ count ( $ args = func_get_args ( ) ) === 1 ) { $ args = $ args [ 0 ] ; } $ uri = $ args [ 0 ] ; $ options = $ args [ 1 ] ?? [ ] ; $ callback = $ args [ 2 ] ?? null ; if ( $ callback ) { $ options [ 'fopen' ] [ 'notification' ] = [ 'self' , 'progress' ] ; } if ( isset ( $ options [ 'fopen' ] [ 'ssl' ] ) ) { $ ssl = $ options [ 'fopen' ] [ 'ssl' ] ; unset ( $ options [ 'fopen' ] [ 'ssl' ] ) ; $ stream = stream_context_create ( [ 'http' => $ options [ 'fopen' ] , 'ssl' => $ ssl ] , $ options [ 'fopen' ] ) ; } else { $ stream = stream_context_create ( [ 'http' => $ options [ 'fopen' ] ] , $ options [ 'fopen' ] ) ; } $ content = @ file_get_contents ( $ uri , false , $ stream ) ; if ( $ content === false ) { $ code = null ; // Function file_get_contents() creates local variable $http_response_header, check it if ( isset ( $ http_response_header ) ) { $ code = explode ( ' ' , $ http_response_header [ 0 ] ?? '' ) [ 1 ] ?? null ; } switch ( $ code ) { case '404' : throw new \ RuntimeException ( 'Page not found' ) ; case '401' : throw new \ RuntimeException ( 'Invalid LICENSE' ) ; default : throw new \ RuntimeException ( "Error while trying to download (code: {$code}): {$uri}\n" ) ; } } return $ content ; }
docstring: Starts a HTTP request via fopen
  
  @return string The response of the request
docstring_tokens: Starts a HTTP request via fopen