which is better expression to make string into xml object[php]? -
which better expression make string xml object[php]?
$xml = new simplexmlelement($xml_string);
vs
$xml = simplexml_load_string($xml_string);
same?
they're identical. simplexmlelement::__construct
accepts data strings or file paths, if set appropriate options. simplexml_load_file
, simplexml_load_string
convenience function wrappers amount same thing new simplexmlelement()
correct options set.
Comments
Post a Comment