3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $the_date = strtotime('31.10.2013'); echo date('r', strtotime('first day of last month', $the_date));
Output for 5.3.0 - 7.1.0
Sun, 01 Sep 2013 00:00:00 +0200
Output for 5.1.0 - 5.2.17
Thu, 01 Jan 1970 01:00:00 +0100
Output for 4.3.11 - 4.4.9, 5.0.4 - 5.0.5
Thu, 01 Jan 1970 00:59:59 +0100
Output for 4.3.0 - 4.3.10, 5.0.0 - 5.0.3
Thu, 1 Jan 1970 00:59:59 +0100