The error says:
Deprecated: Passing parameters to the constructor is no longer supported. Please use set_feed_url(), set_cache_location(), and set_cache_location() directly
The error is quite clear. You are not supposed to do this:
$feed = new SimplePie("https://news.google.com/news/feeds?pz=1&cf=all&ned=us&hl=en&topic=h&num=3&output=rss");
(The constructor is the function that is called automatically when you create a class instance with the new
operator, it that was your confusion.) The documentation says it explicitly:
Previously, it was possible to pass in the feed URL along with cache options directly into the constructor. This has been removed as of 1.3 as it caused a lot of confusion.
Instead, you have to do this:
$feed = new SimplePie();
... and use the appropriate methods to provide the parameters. As the name suggests, set_feed_url() can be used to provide the feed's URL.