Jump to content

Whats faster? simplexml_load_string or simplexml_load_file?


Demonic

Recommended Posts

I was wondering this because at the moment using simplexml_load_file makes my script go at about 2 seconds per page load, in a loop.  Then I created a cache system so it doesn't keep loading the xml file, but I'm wondering if theres a faster way to load xml QUICKER, is it possible with "file_get_contents" and "simplexml_load_string" ?

simplexml_load_string does exactly what it says, its loads a specified string into an object. So if your wanting to load an xml file this isnt going to be of much help. Are u using the whole xml file, or wanting specific elements from the file?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.