3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function lastWeekDay ($mnt) { $result = strtotime("last day of $mnt"); $day = date('D', $result); if ('Sun' === $day) { $result -= 86400 * 2; } if ('Sat' === $day) { $result -= 86400; } return $result; } $dates = array(); $timestamp = strtotime('-30 days'); for ($i = 0 ; $i <=30 ; $i++) { $dates[$i]= date('M j', $timestamp); $timestamp += 24 * 3600; } echo $timestamp;
Output for 4.3.0 - 4.4.9, 5.0.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
1391516991
Output for 5.0.0 - 5.0.2
1391468400