3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $input = array( 'last day of this month', 'Last day of this month', 'lAst Day of This Month'); foreach ($input as $str) { var_dump(date('Y-m-d', strtotime($str))); }
Output for 5.5.18 - 5.5.38, 5.6.1 - 7.1.0
string(10) "2016-09-30" string(10) "2016-09-30" string(10) "2016-09-30"
Output for 5.3.0 - 5.5.16, 5.6.0
string(10) "2016-09-30" string(10) "2016-09-01" string(10) "2016-09-30"
Output for 4.3.0 - 5.2.17
string(10) "1970-01-01" string(10) "1970-01-01" string(10) "1970-01-01"