改名
This commit is contained in:
+3
-4
@@ -32,17 +32,16 @@ class Xml
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $str
|
* @param $str
|
||||||
* @return bool
|
* @return array|bool|object
|
||||||
*/
|
*/
|
||||||
public static function isXml(&$str)
|
public static function isXml($str)
|
||||||
{
|
{
|
||||||
$xml_parser = xml_parser_create();
|
$xml_parser = xml_parser_create();
|
||||||
if (!xml_parse($xml_parser, $str, true)) {
|
if (!xml_parse($xml_parser, $str, true)) {
|
||||||
xml_parser_free($xml_parser);
|
xml_parser_free($xml_parser);
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
$str = self::toArray($str);
|
return self::toArray($str);
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user