Convert month number to month name in PHP

This function will convert month number to month name. For example: 3 becomes March.
It uses PHP DateTime class and tested with PHP 5.3

	function _month_name($number = 1, $format = "F")
	{
		return DateTime::createFromFormat('!m', $number)->format($format);
	}


Usage:

	echo _month_name(2) ."<br/>";
	echo _month_name(2, 'M');  // M: Short name or F: Full name

Output:

February
Feb