How to convert unix timestamp to date in PHP

Here's a simple way to convert any unix timestamp to a formatted date in PHP using PHP's inbuilt date formatter.

// your timestamp
$timestamp = "1675072637";

$str = date('m/d/Y', $timestamp);

// or var_dump($str);
echo $str;
How to convert unix timestamp to date