How To Convert UNIX Timestamps to Date using PHP CLI

Author: , August 15th, 2015

For a quick visual check to see what the human-readable date is based on a UNIX timestamp integer: php -r ‘print date(“r”,1483228799);’ php -r ‘print strtotime(“1 Jan 2015”) – 1;’

How to Calculate the Last Day of the Month in PHP

Author: , April 24th, 2012

$lastDay = date(“Y-m-t”, strtotime(“-3 months”)); $firstDay = date(“Y-m-01”, strtotime(“-3 months”));