What are alternative, more concise methods for replacing numerical month values with their corresponding names in PHP?

When working with numerical month values in PHP, one common task is to replace these values with their corresponding month names. One way to achieve this is by using an array to map the numerical values to month names. This can be done using a simple associative array where the keys are the numerical values and the values are the corresponding month names.

// Define an associative array mapping numerical month values to month names
$months = [
    1 => 'January',
    2 => 'February',
    3 => 'March',
    4 => 'April',
    5 => 'May',
    6 => 'June',
    7 => 'July',
    8 => 'August',
    9 => 'September',
    10 => 'October',
    11 => 'November',
    12 => 'December'
];

// Replace numerical month values with month names
$monthValue = 3; // Example numerical month value
$monthName = $months[$monthValue]; // Get the corresponding month name
echo $monthName; // Output: March