$feed1 = new SimplePie();
$feed2 = new SimplePie();
$feed3 = new SimplePie();
$feed4 = new SimplePie();
$feed1->enable_cache(false);
$feed2->enable_cache(false);
$feed3->enable_cache(false);
$feed4->enable_cache(false);
I tried code below, but I got unexpected result.
$feed1=$feed2=$feed3=$feed4=new SimplePie();
$feed1->$feed2->$feed3->$feed4->enable_cache(false);
You can utilize functions and arrays. Create an array to hold all the instances and make a function that will do all the repetitive work.
Then you can easily reference any of the instances through the array index: