I have a php sript with three functions like this:
public function a($html,$text)
{
return array();
}
public function b($html,$text){
return array();
}
public function c($html,$text){
return array();
}
require_once 'simple_html_dom.php';
$a=array();
$html=new simple_html_dom();
$a=$this->a($html,$text);
$b=$this->b($html,$text);
$c=$this->c($html,$text);
$html->clear();
unset($html);
$a=array_merge($a, $c);
$a=array_merge($a, $b);
a($html,$text) takes 5 seconds before giving a result
b($html,$text) takes 10 seconds before giving a result
c($html,$text) takes 12 seconds before giving a result
Thus, the system takes 27 seconds before giving me the result, but I want to get the result in 12 seconds. I cannot use streams because my hosting does not support streams. How can I solve this problem?
source
share