Easy access on RSS feeds

Code
<?php

use Laminas\Feed\Reader\Feed\Rss;

$rss '<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
 <title>RSS Title</title>
 <description>This is a modified example of Wikipedia</description>
 <link>http://www.wikipedia.com</link>
 <lastBuildDate>Mon, 06 Sep 2010 00:01:00 +0000 </lastBuildDate>
 <pubDate>Mon, 06 Sep 2009 16:20:00 +0000 </pubDate>
 <ttl>1800</ttl>
 
 <item>
  <title>Example entry</title>
  <description>Here is some text containing an interesting description.</description>
  <link>http://www.wikipedia.org/</link>
  <guid>1</guid>
  <pubDate>Mon, 06 Sep 2009 16:20:00 +0000 </pubDate>
 </item>
 <item>
  <title>Example entry 2</title>
  <description>Another description for second item.</description>
  <link>http://www.wikipedia.org/</link>
  <guid>2</guid>
  <pubDate>Mon, 06 Sep 2009 16:20:00 +0000 </pubDate>
 </item>
 
</channel>
</rss>'
;

$dom = new DomDocument();
$dom->loadXML($rss);

$rssFeed = new Rss($dom);

echo 
'<strong>' $rssFeed->getTitle() . '</strong>' PHP_EOL;
foreach(
$rssFeed as $entry) {
    
/* @var $entry Laminas\Feed\Reader\Entry\Rss */
    
echo $entry->getTitle() . PHP_EOL .
        
'ID: ' $entry->getId() . PHP_EOL .
        
$entry->getDateModified()->format(
            
DateTime::RSS
        
) . PHP_EOL PHP_EOL;
        
}
Result
RSS Title
Example entry
ID: 1
Mon, 07 Sep 2009 16:20:00 +0000

Example entry 2
ID: 2
Mon, 07 Sep 2009 16:20:00 +0000
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8