public static function getAttributes(\SimpleXMLElement $xml)
    {
        $attributes = [];

        foreach ($xml->attributes() as $name => $value) {
            $attributes[$name] = (string) $value;
        }

        return $attributes;
    }
public static function getAttributes(\SimpleXMLElement $xml)
    {
        $attributes = [];

        foreach ($xml->attributes() as $name => $value) {
            $attributes[$name] = (string) $value;
        }

        return $attributes;
    }
public static function getAttributes ( \ SimpleXMLElement $ xml ) { $ attributes = [ ] ; foreach ( $ xml -> attributes ( ) as $ name => $ value ) { $ attributes [ $ name ] = ( string ) $ value ; } return $ attributes ; }
Get all attributes.

@param \SimpleXMLElement $xml A SimpleXMLElement object.

@return  array The return values of all attributes.
Get all attributes .