original_string: public static function exec($url, array $req = []) {
          usleep(120000);
  
          // generate the POST data string
          $postData = http_build_query($req, '', '&');
  
          // curl handle (initialize if required)
          if (is_null(self::$ch)) {
              self::$ch = curl_init();
              curl_setopt(self::$ch, CURLOPT_RETURNTRANSFER, true);
              curl_setopt(
                  self::$ch,
                  CURLOPT_USERAGENT,
                  'Mozilla/4.0 (compatible; CoinMarketCap PHP API; ' . php_uname('a') . '; PHP/' . phpversion() . ')'
              );
          }
          curl_setopt(self::$ch, CURLOPT_URL, $url . "?" . $postData);
          curl_setopt(self::$ch, CURLOPT_SSL_VERIFYPEER, false);
  
          // run the query
          $res = curl_exec(self::$ch);
          if ($res === false) {
              throw new \Exception("Curl error: " . curl_error(self::$ch));
          }
  
          $json = json_decode($res, true);
  
          // Check for the CoinMarketCap API error
          if (isset($json['error'])) {
              throw new \Exception("CoinMarketCap API error: {$json['error']}");
          }
  
          return $json;
      }
code: public static function exec($url, array $req = []) {
          usleep(120000);
  
          // generate the POST data string
          $postData = http_build_query($req, '', '&');
  
          // curl handle (initialize if required)
          if (is_null(self::$ch)) {
              self::$ch = curl_init();
              curl_setopt(self::$ch, CURLOPT_RETURNTRANSFER, true);
              curl_setopt(
                  self::$ch,
                  CURLOPT_USERAGENT,
                  'Mozilla/4.0 (compatible; CoinMarketCap PHP API; ' . php_uname('a') . '; PHP/' . phpversion() . ')'
              );
          }
          curl_setopt(self::$ch, CURLOPT_URL, $url . "?" . $postData);
          curl_setopt(self::$ch, CURLOPT_SSL_VERIFYPEER, false);
  
          // run the query
          $res = curl_exec(self::$ch);
          if ($res === false) {
              throw new \Exception("Curl error: " . curl_error(self::$ch));
          }
  
          $json = json_decode($res, true);
  
          // Check for the CoinMarketCap API error
          if (isset($json['error'])) {
              throw new \Exception("CoinMarketCap API error: {$json['error']}");
          }
  
          return $json;
      }
code_tokens: public static function exec ( $ url , array $ req = [ ] ) { usleep ( 120000 ) ; // generate the POST data string $ postData = http_build_query ( $ req , '' , '&' ) ; // curl handle (initialize if required) if ( is_null ( self :: $ ch ) ) { self :: $ ch = curl_init ( ) ; curl_setopt ( self :: $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( self :: $ ch , CURLOPT_USERAGENT , 'Mozilla/4.0 (compatible; CoinMarketCap PHP API; ' . php_uname ( 'a' ) . '; PHP/' . phpversion ( ) . ')' ) ; } curl_setopt ( self :: $ ch , CURLOPT_URL , $ url . "?" . $ postData ) ; curl_setopt ( self :: $ ch , CURLOPT_SSL_VERIFYPEER , false ) ; // run the query $ res = curl_exec ( self :: $ ch ) ; if ( $ res === false ) { throw new \ Exception ( "Curl error: " . curl_error ( self :: $ ch ) ) ; } $ json = json_decode ( $ res , true ) ; // Check for the CoinMarketCap API error if ( isset ( $ json [ 'error' ] ) ) { throw new \ Exception ( "CoinMarketCap API error: {$json['error']}" ) ; } return $ json ; }
docstring: Executes curl request to the CoinMarketCap API.
  
  @param array $req Request parameters list.
  
  @return array JSON data.
  @throws \Exception If Curl error or CoinMarketCap API error occurred.
docstring_tokens: Executes curl request to the CoinMarketCap API .