3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("2013-06-01"))); echo "$LastFridayOfMonth \r" ; $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("06-2013"))); echo "$LastFridayOfMonth \r"; $LastFridayOfMonth = date('Y-m-d', strtotime("last Friday", strtotime("2013-06-31"))); echo "$LastFridayOfMonth \r"; echo "Correct answer : 2013-06-28 !" ?>
Output for 4.3.0 - 4.4.9, 5.1.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
2013-05-31 1969-12-26 2013-06-28 Correct answer : 2013-06-28 !
Output for 5.1.0 - 5.1.2
2013-05-31 1970-01-01 2013-06-28 Correct answer : 2013-06-28 !
Output for 5.0.0 - 5.0.5
2013-05-31 2173-08-27 2013-06-28 Correct answer : 2013-06-28 !