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("June 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 5.1.0 - 7.1.0
2013-05-31 2013-05-31 2013-06-28 Correct answer : 2013-06-28 !
Output for 4.3.5 - 5.0.5
2013-05-31 2013-06-21 2013-06-28 Correct answer : 2013-06-28 !
Output for 4.3.0 - 4.3.4
2013-05-31 2018-11-30 2013-06-28 Correct answer : 2013-06-28 !