Using the getdate() function with no arguments:

After executing $d = getdate():
$d['year'] = 2025
Without using the quotes in the key:
$d[year] = 2025
$d['month'] = November
$d["month"] = November
$d[month] = November
$d['mday'] = 18
$d['hours'] = 17
$d['wday'] = 2
$d['weekday'] = Tuesday

Using the getdate() function with an argument:

After executing $e = getdate(filemtime("/home/abu-jeib/temp/a.txt")):
$e['year'] = 1970
$e['month'] = January
$e['mday'] = 1
$e['hours'] = 0
$e['wday'] = 4
$e['weekday'] = Thursday
Now Using the date() function with one argument:

date('r') = Tue, 18 Nov 2025 17:58:08 +0000
date('m/d/y') = 11/18/25
date('m-d-y') = 11-18-25
date('M d, y H:i:s T') = Nov 18, 25 17:58:08 UTC
date('D, M d, Y') = Tue, Nov 18, 2025
date('F jS, Y') =November 18th, 2025
date('\T\h\e \i\m\e \i\s \o\w: H:i:s T') =The time is now: 17:58:08 UTC
date('The time is now: H:i:s T') =UTC05UTC 305811UTC 5808 1120252: 17:58:08 UTC

Now Using the gmdate() function with one argument:

Note: gm stands for Greenwich Mean Time which is used in France and the UK.
gmdate('r') = Tue, 18 Nov 2025 17:58:08 +0000
gmdate('d/m/y') = 18/11/25
gmdate('d-m-y') = 18-11-25
gmdate('M d, y H:i:s T') = Nov 18, 25 17:58:08 GMT
gmdate('D, M d, Y') = Tue, Nov 18, 2025
gmdate('jS F Y') =18th November 2025

Now using a second argument for the date() function:

The last modified date of the file "/home/abu-jeib/temp/a.txt" is printed in the format M d, y H:i:s

date('M d, y H:i:s',filemtime('/home/abu-jeib/temp/a.txt')) = Jan 01, 70 00:00:00

Now using a second argument for the gmdate() function:

The last modified date of the file "/home/abu-jeib/temp/a.txt" is printed in the format M d, y H:i:s

gmdate('M d, y H:i:s',filemtime('/home/abu-jeib/temp/a.txt')) = Jan 01, 70 00:00:00