Skip to content

Instantly share code, notes, and snippets.

@asgrim

asgrim/months.php

Created Jan 18, 2017
Embed
What would you like to do?
<?php
$months = array_map(
function ($i) {
return (new \DateTimeImmutable())->setDate(2017, $i, 1)->format('F');
},
range(1, 12)
);
var_dump($months);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment