Closed firefly0621 closed 6 years ago
xml2array的入参xml是啥?
public static function xml2array($xml)
{
$data = json_decode(json_encode(simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA)), true) || [];
if (! is_array($data)) {
$data = [];
}
return $data;
}
这$data要么为真要么为假吧
好的,感谢提供信息,稍候更新。
helper类中xml2array函数始终返回[];