$samples) { foreach ($samples as $url) { $downloaded_samples[$type][$url] = file_get_contents($url); } } $parse_time = array(); /** * Test SimplePie */ foreach($downloaded_samples as $type => $samples) { foreach($samples as $url => $data) { $timer_name = 'SimplePie' . $type . "-". $url; timer_start($timer_name); $feed = new SimplePie(); $feed->feed_url($url); $feed->init(); $parsed = $feed->get_items(); $parse_time['SimplePie'][$type][$url] = timer_read($timer_name) / 1000; } } /** * Test leech parser */ foreach($downloaded_samples as $type => $samples) { foreach($samples as $url => $data) { $timer_name = 'leech' . $type . "-". $url; timer_start($timer_name); $parsed = leech_news_parse_news_feed($data); $parse_time['leech'][$type][$url] = timer_read($timer_name) / 1000; } } /** * Test Aggregation's parser */ timer_start("Aggregation"); $feed = new stdClass(); $string = $downloaded_samples['RSS2.0']["http://users.hszk.bme.hu/~na665/catfeed_2.xml"]; if (!defined('LIBXML_VERSION') || (version_compare(phpversion(), '5.1.0', '<'))) @ $xml = simplexml_load_string($string, NULL); else @ $xml = simplexml_load_string($string, NULL, LIBXML_NOERROR | LIBXML_NOWARNING); $parsed = _aggregation_RDF10_parse($xml, $feed); print_r($parse_time); print(timer_read("Aggregation") / 1000);