What are some alternative methods to achieve the same outcome as the provided PHP code for listing months and years?

The provided PHP code lists out the months and years for the next 12 months. An alternative method to achieve the same outcome is to use the `DateTime` class in PHP to increment the date by one month in a loop and extract the month and year values.

<?php
// Initialize current date
$date = new DateTime();

// Loop through the next 12 months
for ($i = 0; $i < 12; $i++) {
    // Output month and year
    echo $date->format('F Y') . "<br>";
    
    // Increment date by one month
    $date->modify('+1 month');
}
?>