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

Popular posts from this blog

jQuery clickable div with working mailto link inside -

java - Getting corefrences with Standard corenlp package -

WPF: binding viewmodel property of type DateTime to Calendar inside ItemsControl -