public static function xmlArray($xml)
    {
        $dom = simplexml_load_file($xml);
        $json_encode = json_encode($dom);
        $json_decode = json_decode($json_encode, true);

        return $json_decode;
    }
public static function xmlArray($xml)
    {
        $dom = simplexml_load_file($xml);
        $json_encode = json_encode($dom);
        $json_decode = json_decode($json_encode, true);

        return $json_decode;
    }
public static function xmlArray ( $ xml ) { $ dom = simplexml_load_file ( $ xml ) ; $ json_encode = json_encode ( $ dom ) ; $ json_decode = json_decode ( $ json_encode , true ) ; return $ json_decode ; }
Convert XML to arrays.

@param xml object $xml xml

@since 2.0.0

@return array
Convert XML to arrays .