protected static function parseAttributes($xml)
	{
		$attributes = [];
		if (strpos($xml, '="') !== false)
		{
			preg_match_all('(([^ =]++)="([^"]*))S', $xml, $matches);
			foreach ($matches[1] as $i => $attrName)
			{
				$attributes[$attrName] = html_entity_decode($matches[2][$i], ENT_QUOTES, 'UTF-8');
			}
		}

		return $attributes;
	}
protected static function parseAttributes($xml)
	{
		$attributes = [];
		if (strpos($xml, '="') !== false)
		{
			preg_match_all('(([^ =]++)="([^"]*))S', $xml, $matches);
			foreach ($matches[1] as $i => $attrName)
			{
				$attributes[$attrName] = html_entity_decode($matches[2][$i], ENT_QUOTES, 'UTF-8');
			}
		}

		return $attributes;
	}
protected static function parseAttributes ( $ xml ) { $ attributes = [ ] ; if ( strpos ( $ xml , '="' ) !== false ) { preg_match_all ( '(([^ =]++)="([^"]*))S' , $ xml , $ matches ) ; foreach ( $ matches [ 1 ] as $ i => $ attrName ) { $ attributes [ $ attrName ] = html_entity_decode ( $ matches [ 2 ] [ $ i ] , ENT_QUOTES , 'UTF-8' ) ; } } return $ attributes ; }
Parse the attributes contained in given XML

@param  string $xml XML string, normally a start tag
@return array       Associative array of attribute values
Parse the attributes contained in given XML