original_string: public static function multibyteParseUrl($url)
      {
          $enc_url = preg_replace_callback(
              '%[^:/@?&=#]+%usD',
              function ($matches) {
                  return urlencode($matches[0]);
              },
              $url
          );
  
          $parts = parse_url($enc_url);
  
          if($parts === false) {
              throw new \InvalidArgumentException('Malformed URL: ' . $url);
          }
  
          foreach($parts as $name => $value) {
              $parts[$name] = urldecode($value);
          }
  
          return $parts;
      }
code: public static function multibyteParseUrl($url)
      {
          $enc_url = preg_replace_callback(
              '%[^:/@?&=#]+%usD',
              function ($matches) {
                  return urlencode($matches[0]);
              },
              $url
          );
  
          $parts = parse_url($enc_url);
  
          if($parts === false) {
              throw new \InvalidArgumentException('Malformed URL: ' . $url);
          }
  
          foreach($parts as $name => $value) {
              $parts[$name] = urldecode($value);
          }
  
          return $parts;
      }
code_tokens: public static function multibyteParseUrl ( $ url ) { $ enc_url = preg_replace_callback ( '%[^:/@?&=#]+%usD' , function ( $ matches ) { return urlencode ( $ matches [ 0 ] ) ; } , $ url ) ; $ parts = parse_url ( $ enc_url ) ; if ( $ parts === false ) { throw new \ InvalidArgumentException ( 'Malformed URL: ' . $ url ) ; } foreach ( $ parts as $ name => $ value ) { $ parts [ $ name ] = urldecode ( $ value ) ; } return $ parts ; }
docstring: Multibyte-safe Parse URL function
  
  @param string $url
  @return array
  @throws \InvalidArgumentException
docstring_tokens: Multibyte - safe Parse URL function