3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $today = getdate(); $last30Days = getdate(strtotime("30 days ago", $today[0])); var_dump($last30Days);
Output for 5.6.28, 7.0.14 - 7.1.0
array(11) { ["seconds"]=> int(29) ["minutes"]=> int(30) ["hours"]=> int(20) ["mday"]=> int(23) ["wday"]=> int(6) ["mon"]=> int(11) ["year"]=> int(2013) ["yday"]=> int(326) ["weekday"]=> string(8) "Saturday" ["month"]=> string(8) "November" [0]=> int(1385235029) }
Output for 7.0.6
array(11) { ["seconds"]=> int(31) ["minutes"]=> int(44) ["hours"]=> int(1) ["mday"]=> int(3) ["wday"]=> int(0) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(93) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "April" [0]=> int(1459640671) }
Output for 7.0.5
array(11) { ["seconds"]=> int(19) ["minutes"]=> int(2) ["hours"]=> int(15) ["mday"]=> int(3) ["wday"]=> int(4) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(62) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "March" [0]=> int(1457013739) }
Output for 7.0.4
array(11) { ["seconds"]=> int(59) ["minutes"]=> int(9) ["hours"]=> int(0) ["mday"]=> int(9) ["wday"]=> int(2) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(39) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "February" [0]=> int(1454972999) }
Output for 7.0.3
array(11) { ["seconds"]=> int(55) ["minutes"]=> int(36) ["hours"]=> int(0) ["mday"]=> int(17) ["wday"]=> int(3) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(47) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(8) "February" [0]=> int(1455665815) }
Output for 7.0.2
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(14) ["hours"]=> int(11) ["mday"]=> int(20) ["wday"]=> int(6) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(50) ["weekday"]=> string(8) "Saturday" ["month"]=> string(8) "February" [0]=> int(1455963267) }
Output for 7.0.1
array(11) { ["seconds"]=> int(37) ["minutes"]=> int(25) ["hours"]=> int(11) ["mday"]=> int(22) ["wday"]=> int(1) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(52) ["weekday"]=> string(6) "Monday" ["month"]=> string(8) "February" [0]=> int(1456136737) }
Output for 7.0.0
array(11) { ["seconds"]=> int(3) ["minutes"]=> int(59) ["hours"]=> int(13) ["mday"]=> int(25) ["wday"]=> int(4) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(55) ["weekday"]=> string(8) "Thursday" ["month"]=> string(8) "February" [0]=> int(1456405143) }
Output for 5.6.21
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(48) ["hours"]=> int(20) ["mday"]=> int(1) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(91) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1459536507) }
Output for 5.6.20
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(17) ["hours"]=> int(10) ["mday"]=> int(10) ["wday"]=> int(4) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(69) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "March" [0]=> int(1457601450) }
Output for 5.6.19
array(11) { ["seconds"]=> int(0) ["minutes"]=> int(20) ["hours"]=> int(22) ["mday"]=> int(5) ["wday"]=> int(5) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(35) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "February" [0]=> int(1454707200) }
Output for 5.6.18
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(4) ["hours"]=> int(10) ["mday"]=> int(13) ["wday"]=> int(6) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(43) ["weekday"]=> string(8) "Saturday" ["month"]=> string(8) "February" [0]=> int(1455354290) }
Output for 5.6.17
array(11) { ["seconds"]=> int(7) ["minutes"]=> int(8) ["hours"]=> int(5) ["mday"]=> int(18) ["wday"]=> int(4) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(48) ["weekday"]=> string(8) "Thursday" ["month"]=> string(8) "February" [0]=> int(1455768487) }
Output for 5.6.16
array(11) { ["seconds"]=> int(31) ["minutes"]=> int(43) ["hours"]=> int(15) ["mday"]=> int(26) ["wday"]=> int(5) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(56) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "February" [0]=> int(1456497811) }
Output for 5.6.15
array(11) { ["seconds"]=> int(56) ["minutes"]=> int(37) ["hours"]=> int(16) ["mday"]=> int(27) ["wday"]=> int(6) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(57) ["weekday"]=> string(8) "Saturday" ["month"]=> string(8) "February" [0]=> int(1456587476) }
Output for 5.6.14
array(11) { ["seconds"]=> int(12) ["minutes"]=> int(18) ["hours"]=> int(19) ["mday"]=> int(2) ["wday"]=> int(3) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(61) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "March" [0]=> int(1456942692) }
Output for 5.6.13
array(11) { ["seconds"]=> int(42) ["minutes"]=> int(5) ["hours"]=> int(23) ["mday"]=> int(15) ["wday"]=> int(2) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(74) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "March" [0]=> int(1458079542) }
Output for 5.6.12
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(12) ["hours"]=> int(12) ["mday"]=> int(20) ["wday"]=> int(0) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(79) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "March" [0]=> int(1458472359) }
Output for 5.6.11
array(11) { ["seconds"]=> int(7) ["minutes"]=> int(29) ["hours"]=> int(19) ["mday"]=> int(23) ["wday"]=> int(3) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(82) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "March" [0]=> int(1458757747) }
Output for 5.6.10
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(8) ["hours"]=> int(21) ["mday"]=> int(25) ["wday"]=> int(5) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(84) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "March" [0]=> int(1458936530) }
Output for 5.6.9
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(16) ["hours"]=> int(2) ["mday"]=> int(28) ["wday"]=> int(1) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(87) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "March" [0]=> int(1459124199) }
Output for 5.6.8
array(11) { ["seconds"]=> int(40) ["minutes"]=> int(49) ["hours"]=> int(9) ["mday"]=> int(30) ["wday"]=> int(3) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(89) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "March" [0]=> int(1459324180) }
Output for 5.6.7
array(11) { ["seconds"]=> int(38) ["minutes"]=> int(19) ["hours"]=> int(20) ["mday"]=> int(24) ["wday"]=> int(0) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(114) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "April" [0]=> int(1461521978) }
Output for 5.5.35
array(11) { ["seconds"]=> int(13) ["minutes"]=> int(4) ["hours"]=> int(0) ["mday"]=> int(22) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(112) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1461276253) }
Output for 5.5.34
array(11) { ["seconds"]=> int(29) ["minutes"]=> int(12) ["hours"]=> int(16) ["mday"]=> int(11) ["wday"]=> int(5) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(70) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "March" [0]=> int(1457709149) }
Output for 5.5.33
array(11) { ["seconds"]=> int(44) ["minutes"]=> int(21) ["hours"]=> int(11) ["mday"]=> int(7) ["wday"]=> int(0) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(37) ["weekday"]=> string(6) "Sunday" ["month"]=> string(8) "February" [0]=> int(1454840504) }
Output for 5.5.32
array(11) { ["seconds"]=> int(9) ["minutes"]=> int(56) ["hours"]=> int(16) ["mday"]=> int(15) ["wday"]=> int(1) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(45) ["weekday"]=> string(6) "Monday" ["month"]=> string(8) "February" [0]=> int(1455551769) }
Output for 5.5.31
array(11) { ["seconds"]=> int(19) ["minutes"]=> int(1) ["hours"]=> int(8) ["mday"]=> int(19) ["wday"]=> int(5) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(49) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "February" [0]=> int(1455865279) }
Output for 5.5.30
array(11) { ["seconds"]=> int(20) ["minutes"]=> int(40) ["hours"]=> int(18) ["mday"]=> int(1) ["wday"]=> int(2) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(60) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "March" [0]=> int(1456854020) }
Output for 5.5.29
array(11) { ["seconds"]=> int(6) ["minutes"]=> int(11) ["hours"]=> int(13) ["mday"]=> int(17) ["wday"]=> int(4) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(76) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "March" [0]=> int(1458216666) }
Output for 5.5.28
array(11) { ["seconds"]=> int(38) ["minutes"]=> int(25) ["hours"]=> int(15) ["mday"]=> int(21) ["wday"]=> int(1) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(80) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "March" [0]=> int(1458570338) }
Output for 5.5.27
array(11) { ["seconds"]=> int(41) ["minutes"]=> int(0) ["hours"]=> int(18) ["mday"]=> int(22) ["wday"]=> int(2) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(81) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "March" [0]=> int(1458666041) }
Output for 5.5.26
array(11) { ["seconds"]=> int(41) ["minutes"]=> int(25) ["hours"]=> int(23) ["mday"]=> int(26) ["wday"]=> int(6) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(85) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "March" [0]=> int(1459031141) }
Output for 5.5.25
array(11) { ["seconds"]=> int(53) ["minutes"]=> int(32) ["hours"]=> int(5) ["mday"]=> int(29) ["wday"]=> int(2) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(88) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "March" [0]=> int(1459222373) }
Output for 5.5.24
array(11) { ["seconds"]=> int(26) ["minutes"]=> int(7) ["hours"]=> int(13) ["mday"]=> int(31) ["wday"]=> int(4) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(90) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "March" [0]=> int(1459422446) }
Output for 5.4.44 - 5.4.45
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015179) }
Output for 5.4.35 - 5.4.43
array(11) { ["seconds"]=> int(40) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015180) }
Output for 5.4.27 - 5.4.34
array(11) { ["seconds"]=> int(41) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015181) }
Output for 5.4.19 - 5.4.26
array(11) { ["seconds"]=> int(42) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015182) }
Output for 5.4.11 - 5.4.18
array(11) { ["seconds"]=> int(43) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015183) }
Output for 5.4.3 - 5.4.10
array(11) { ["seconds"]=> int(44) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015184) }
Output for 5.3.25 - 5.4.2
array(11) { ["seconds"]=> int(45) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015185) }
Output for 5.3.17 - 5.3.24
array(11) { ["seconds"]=> int(46) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015186) }
Output for 5.3.7 - 5.3.16
array(11) { ["seconds"]=> int(47) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015187) }
Output for 5.2.17 - 5.3.6
array(11) { ["seconds"]=> int(48) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015188) }
Output for 5.2.7 - 5.2.16
array(11) { ["seconds"]=> int(49) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015189) }
Output for 5.1.5 - 5.2.6
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015190) }
Output for 4.4.9, 5.0.3 - 5.1.4
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015191) }
Output for 5.0.0 - 5.0.2
array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(0) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1443996000) }
Output for 4.3.8 - 4.4.8
array(11) { ["seconds"]=> int(52) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015192) }
Output for 4.3.0 - 4.3.7
array(11) { ["seconds"]=> int(53) ["minutes"]=> int(19) ["hours"]=> int(5) ["mday"]=> int(5) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(277) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1444015193) }