PHP: Acquiring Date Information with getdate()

seconds = 54
minutes = 29
hours = 9
mday = 19
wday = 0
mon = 5
year = 2019
yday = 138
weekday = Sunday
month = May
0 = 1558283394

Today's date: 5/19/2019

Today's date: Sunday, May 19th, 2019

<?php
$date_array =  getdate(); // no argument passed so today's date will be used
foreach ( $date_array as $key => $val ) {
    print ( "$key = $val<br />";
}
    
?>
<hr />

<?php
print "Today's date: ".$date_array['mon']."/".$date_array['mday']."/".$date_array['year']."<p>";
print "Today's date: ".$date_array['weekday'].", ".$date_array['month']." ".$date_array['mday']."th, ".$date_array['year']."<p>";

?>