original_string: public static function split_tag_attributes($tag) {
  		$tag_tmp = trim(preg_replace('/^<[^[:space:]]*/', '', trim($tag)));
  			// Removes any > in the end of the string
  		$tag_tmp = trim(rtrim($tag_tmp, '>'));
  
  		$value = array();
  		while (strcmp($tag_tmp, '')) { // Compared with empty string instead , 030102
  			$firstChar = substr($tag_tmp, 0, 1);
  			if (!strcmp($firstChar, '"') || !strcmp($firstChar, "'")) {
  				$reg = explode($firstChar, $tag_tmp, 3);
  				$value[] = $reg[1];
  				$tag_tmp = trim($reg[2]);
  			} elseif (!strcmp($firstChar, '=')) {
  				$value[] = '=';
  				$tag_tmp = trim(substr($tag_tmp, 1)); // Removes = chars.
  			} else {
  					// There are '' around the value. We look for the next ' ' or '>'
  				$reg = preg_split('/[[:space:]=]/', $tag_tmp, 2);
  				$value[] = trim($reg[0]);
  				$tag_tmp = trim(substr($tag_tmp, strlen($reg[0]), 1) . $reg[1]);
  			}
  		}
  		reset($value);
  		return $value;
  	}
code: public static function split_tag_attributes($tag) {
  		$tag_tmp = trim(preg_replace('/^<[^[:space:]]*/', '', trim($tag)));
  			// Removes any > in the end of the string
  		$tag_tmp = trim(rtrim($tag_tmp, '>'));
  
  		$value = array();
  		while (strcmp($tag_tmp, '')) { // Compared with empty string instead , 030102
  			$firstChar = substr($tag_tmp, 0, 1);
  			if (!strcmp($firstChar, '"') || !strcmp($firstChar, "'")) {
  				$reg = explode($firstChar, $tag_tmp, 3);
  				$value[] = $reg[1];
  				$tag_tmp = trim($reg[2]);
  			} elseif (!strcmp($firstChar, '=')) {
  				$value[] = '=';
  				$tag_tmp = trim(substr($tag_tmp, 1)); // Removes = chars.
  			} else {
  					// There are '' around the value. We look for the next ' ' or '>'
  				$reg = preg_split('/[[:space:]=]/', $tag_tmp, 2);
  				$value[] = trim($reg[0]);
  				$tag_tmp = trim(substr($tag_tmp, strlen($reg[0]), 1) . $reg[1]);
  			}
  		}
  		reset($value);
  		return $value;
  	}
code_tokens: public static function split_tag_attributes ( $ tag ) { $ tag_tmp = trim ( preg_replace ( '/^<[^[:space:]]*/' , '' , trim ( $ tag ) ) ) ; // Removes any > in the end of the string $ tag_tmp = trim ( rtrim ( $ tag_tmp , '>' ) ) ; $ value = array ( ) ; while ( strcmp ( $ tag_tmp , '' ) ) { // Compared with empty string instead , 030102 $ firstChar = substr ( $ tag_tmp , 0 , 1 ) ; if ( ! strcmp ( $ firstChar , '"' ) || ! strcmp ( $ firstChar , "'" ) ) { $ reg = explode ( $ firstChar , $ tag_tmp , 3 ) ; $ value [ ] = $ reg [ 1 ] ; $ tag_tmp = trim ( $ reg [ 2 ] ) ; } elseif ( ! strcmp ( $ firstChar , '=' ) ) { $ value [ ] = '=' ; $ tag_tmp = trim ( substr ( $ tag_tmp , 1 ) ) ; // Removes = chars. } else { // There are '' around the value. We look for the next ' ' or '>' $ reg = preg_split ( '/[[:space:]=]/' , $ tag_tmp , 2 ) ; $ value [ ] = trim ( $ reg [ 0 ] ) ; $ tag_tmp = trim ( substr ( $ tag_tmp , strlen ( $ reg [ 0 ] ) , 1 ) . $ reg [ 1 ] ) ; } } reset ( $ value ) ; return $ value ; }
docstring: Returns an array with the 'components' from an attribute list from an HTML tag. The result is normally analyzed by get_tag_attributes
  Removes tag-name if found
  
  @param string $tag HTML-tag string (or attributes only)
  @return array Array with the attribute values.
docstring_tokens: Returns an array with the components from an attribute list from an HTML tag . The result is normally analyzed by get_tag_attributes Removes tag - name if found