Q:

PHP date function producing incorrect result

Am currently running the following PHP version on my laptop
PHP Version 7.0.31-1+ubuntu16.04.1+deb.sury.org+1

Problem is when i run the below piece of code
echo date('b e, Y', strtotime('2013-02-01'));

i get the following output
b Africa/Nairobi, 2013

and yet it is supposed to produce the following output
Feb 1, 2013

What could be causing this?

A:

I think you might want to read the documentation for the date() function again.  There is no b option that I'm aware of and:

e - Timezone identifier (added in PHP 5.1.0)

To achieve that result you'd want:
echo date('M j, Y', strtotime('2013-02-01'));

M - A short textual representation of a month, three letters
j - Day of the month without leading zeros

A:

Try simply this M j, Y, See more formatting at official php documentation http://php.net/manual/en/function.date.php
 echo date('M j, Y', strtotime('2013-02-01'));

M   A short textual representation of a month, three letters e.g Jan through Dec
j   Day of the month without leading zeros e.g 1 to 31
Y   A full numeric representation of a year, 4 digits   e.g: 1999 or 2003
DEMO: https://3v4l.org/97Uvq

