original_string: public static function parse($string)
    {
      $attr = [];
      $list = [];
  
      preg_match_all('/([\w:-]+)[\s]?=[\s]?"([^"]*)"/i', $string, $attr);
  
      if ( is_array($attr) ){
        $numPairs = count($attr[1]);
        for ($i = 0; $i < $numPairs; $i++){
          $list[$attr[1][$i]] = $attr[2][$i];
        }
      }
      
      return $list;
    }
code: public static function parse($string)
    {
      $attr = [];
      $list = [];
  
      preg_match_all('/([\w:-]+)[\s]?=[\s]?"([^"]*)"/i', $string, $attr);
  
      if ( is_array($attr) ){
        $numPairs = count($attr[1]);
        for ($i = 0; $i < $numPairs; $i++){
          $list[$attr[1][$i]] = $attr[2][$i];
        }
      }
      
      return $list;
    }
code_tokens: public static function parse ( $ string ) { $ attr = [ ] ; $ list = [ ] ; preg_match_all ( '/([\w:-]+)[\s]?=[\s]?"([^"]*)"/i' , $ string , $ attr ) ; if ( is_array ( $ attr ) ) { $ numPairs = count ( $ attr [ 1 ] ) ; for ( $ i = 0 ; $ i < $ numPairs ; $ i ++ ) { $ list [ $ attr [ 1 ] [ $ i ] ] = $ attr [ 2 ] [ $ i ] ; } } return $ list ; }
docstring: Parse html tag attributes
  
  @param   string   $string  The tag attributes
  @return   array    Key/Value pairs
docstring_tokens: Parse html tag attributes