3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$writer = new XMLWriter(); echo var_dump(getdate(strtotime("-2 month")));
based on jOGSu
Output for 5.6.28, 7.0.14 - 7.1.0
array(11) { ["seconds"]=> int(16) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481976) }
Output for 7.0.6
array(11) { ["seconds"]=> int(56) ["minutes"]=> int(58) ["hours"]=> int(6) ["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(1456984736) }
Output for 7.0.5
array(11) { ["seconds"]=> int(2) ["minutes"]=> int(59) ["hours"]=> int(19) ["mday"]=> int(2) ["wday"]=> int(2) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(32) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "February" [0]=> int(1454439542) }
Output for 7.0.4
array(11) { ["seconds"]=> int(55) ["minutes"]=> int(7) ["hours"]=> int(6) ["mday"]=> int(10) ["wday"]=> int(0) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(9) ["weekday"]=> string(6) "Sunday" ["month"]=> string(7) "January" [0]=> int(1452402475) }
Output for 7.0.3
array(11) { ["seconds"]=> int(43) ["minutes"]=> int(34) ["hours"]=> int(6) ["mday"]=> int(18) ["wday"]=> int(1) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(17) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "January" [0]=> int(1453095283) }
Output for 7.0.2
array(11) { ["seconds"]=> int(40) ["minutes"]=> int(7) ["hours"]=> int(12) ["mday"]=> int(22) ["wday"]=> int(5) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(21) ["weekday"]=> string(6) "Friday" ["month"]=> string(7) "January" [0]=> int(1453460860) }
Output for 7.0.1
array(11) { ["seconds"]=> int(58) ["minutes"]=> int(29) ["hours"]=> int(17) ["mday"]=> int(23) ["wday"]=> int(6) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(22) ["weekday"]=> string(8) "Saturday" ["month"]=> string(7) "January" [0]=> int(1453566598) }
Output for 7.0.0
array(11) { ["seconds"]=> int(11) ["minutes"]=> int(12) ["hours"]=> int(19) ["mday"]=> int(26) ["wday"]=> int(2) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(25) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(7) "January" [0]=> int(1453831931) }
Output for hhvm-3.12.0
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(16) ["hours"]=> int(15) ["mday"]=> int(11) ["wday"]=> int(1) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(10) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "January" [0]=> int(1452521811) }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
array(11) { ["seconds"]=> int(57) ["minutes"]=> int(15) ["hours"]=> int(2) ["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(1456881357) }
Output for 5.6.20
array(11) { ["seconds"]=> int(21) ["minutes"]=> int(17) ["hours"]=> int(15) ["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(1455027441) }
Output for 5.6.19
array(11) { ["seconds"]=> int(54) ["minutes"]=> int(38) ["hours"]=> int(7) ["mday"]=> int(7) ["wday"]=> int(4) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(6) ["weekday"]=> string(8) "Thursday" ["month"]=> string(7) "January" [0]=> int(1452148734) }
Output for 5.6.18
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(12) ["hours"]=> int(20) ["mday"]=> int(14) ["wday"]=> int(4) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(13) ["weekday"]=> string(8) "Thursday" ["month"]=> string(7) "January" [0]=> int(1452798771) }
Output for 5.6.17
array(11) { ["seconds"]=> int(5) ["minutes"]=> int(55) ["hours"]=> int(10) ["mday"]=> int(19) ["wday"]=> int(2) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(18) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(7) "January" [0]=> int(1453197305) }
Output for 5.6.16
array(11) { ["seconds"]=> int(5) ["minutes"]=> int(57) ["hours"]=> int(20) ["mday"]=> int(27) ["wday"]=> int(3) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(26) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(7) "January" [0]=> int(1453924625) }
Output for 5.6.15
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(49) ["hours"]=> int(21) ["mday"]=> int(28) ["wday"]=> int(4) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(27) ["weekday"]=> string(8) "Thursday" ["month"]=> string(7) "January" [0]=> int(1454014162) }
Output for 5.6.14
array(11) { ["seconds"]=> int(56) ["minutes"]=> int(17) ["hours"]=> int(0) ["mday"]=> int(2) ["wday"]=> int(2) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(32) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "February" [0]=> int(1454368676) }
Output for 5.6.13
array(11) { ["seconds"]=> int(1) ["minutes"]=> int(22) ["hours"]=> int(4) ["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(1455506521) }
Output for 5.6.12
array(11) { ["seconds"]=> int(38) ["minutes"]=> int(53) ["hours"]=> int(17) ["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(1455900818) }
Output for 5.6.11
array(11) { ["seconds"]=> int(48) ["minutes"]=> int(51) ["hours"]=> int(0) ["mday"]=> int(23) ["wday"]=> int(2) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(53) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "February" [0]=> int(1456185108) }
Output for 5.6.10
array(11) { ["seconds"]=> int(14) ["minutes"]=> int(43) ["hours"]=> int(2) ["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(1456364594) }
Output for 5.6.9
array(11) { ["seconds"]=> int(52) ["minutes"]=> int(41) ["hours"]=> int(7) ["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(1456555312) }
Output for 5.6.8
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(35) ["hours"]=> int(15) ["mday"]=> int(29) ["wday"]=> int(1) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(59) ["weekday"]=> string(6) "Monday" ["month"]=> string(8) "February" [0]=> int(1456756539) }
Output for 5.6.7
array(11) { ["seconds"]=> int(32) ["minutes"]=> int(40) ["hours"]=> int(7) ["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(1458888032) }
Output for 5.5.35
array(11) { ["seconds"]=> int(37) ["minutes"]=> int(53) ["hours"]=> int(5) ["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(1458622417) }
Output for 5.5.34
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(13) ["hours"]=> int(21) ["mday"]=> int(10) ["wday"]=> int(3) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(40) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(8) "February" [0]=> int(1455135210) }
Output for 5.5.33
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(1) ["hours"]=> int(17) ["mday"]=> int(8) ["wday"]=> int(5) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(7) ["weekday"]=> string(6) "Friday" ["month"]=> string(7) "January" [0]=> int(1452268882) }
Output for 5.5.32
array(11) { ["seconds"]=> int(20) ["minutes"]=> int(4) ["hours"]=> int(23) ["mday"]=> int(16) ["wday"]=> int(6) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(15) ["weekday"]=> string(8) "Saturday" ["month"]=> string(7) "January" [0]=> int(1452981860) }
Output for 5.5.31
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(43) ["hours"]=> int(13) ["mday"]=> int(20) ["wday"]=> int(3) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(19) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(7) "January" [0]=> int(1453293830) }
Output for 5.5.30
array(11) { ["seconds"]=> int(2) ["minutes"]=> int(49) ["hours"]=> int(23) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(1) ["year"]=> int(2016) ["yday"]=> int(30) ["weekday"]=> string(6) "Sunday" ["month"]=> string(7) "January" [0]=> int(1454280542) }
Output for 5.5.29
array(11) { ["seconds"]=> int(13) ["minutes"]=> int(27) ["hours"]=> int(18) ["mday"]=> int(16) ["wday"]=> int(2) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(46) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "February" [0]=> int(1455643633) }
Output for 5.5.28
array(11) { ["seconds"]=> int(41) ["minutes"]=> int(57) ["hours"]=> int(20) ["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(1455998261) }
Output for 5.5.27
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(24) ["hours"]=> int(23) ["mday"]=> int(21) ["wday"]=> int(0) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(51) ["weekday"]=> string(6) "Sunday" ["month"]=> string(8) "February" [0]=> int(1456093479) }
Output for 5.5.26
array(11) { ["seconds"]=> int(34) ["minutes"]=> int(9) ["hours"]=> int(5) ["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(1456459774) }
Output for 5.5.25
array(11) { ["seconds"]=> int(59) ["minutes"]=> int(11) ["hours"]=> int(11) ["mday"]=> int(28) ["wday"]=> int(0) ["mon"]=> int(2) ["year"]=> int(2016) ["yday"]=> int(58) ["weekday"]=> string(6) "Sunday" ["month"]=> string(8) "February" [0]=> int(1456654319) }
Output for 5.5.24
array(11) { ["seconds"]=> int(18) ["minutes"]=> int(6) ["hours"]=> int(18) ["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(1458752778) }
Output for 5.4.45
array(11) { ["seconds"]=> int(42) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232522) }
Output for 5.4.44
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232519) }
Output for 5.4.43
array(11) { ["seconds"]=> int(35) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232515) }
Output for 5.4.42
array(11) { ["seconds"]=> int(34) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232514) }
Output for 5.4.41
array(11) { ["seconds"]=> int(32) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232512) }
Output for 4.3.0, 5.4.40
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232510) }
Output for 5.4.39
array(11) { ["seconds"]=> int(29) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232509) }
Output for 5.4.38
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232507) }
Output for 5.4.37
array(11) { ["seconds"]=> int(26) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232506) }
Output for 5.4.36
array(11) { ["seconds"]=> int(25) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232505) }
Output for 5.4.35
array(11) { ["seconds"]=> int(24) ["minutes"]=> int(28) ["hours"]=> int(3) ["mday"]=> int(7) ["wday"]=> int(2) ["mon"]=> int(7) ["year"]=> int(2015) ["yday"]=> int(187) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(4) "July" [0]=> int(1436232504) }
Output for 5.4.31 - 5.4.34
array(11) { ["seconds"]=> int(21) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481981) }
Output for 5.4.10 - 5.4.30
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481982) }
Output for 5.3.19 - 5.4.9
array(11) { ["seconds"]=> int(23) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481983) }
Output for 5.2.15 - 5.3.18
array(11) { ["seconds"]=> int(24) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481984) }
Output for 5.0.3 - 5.2.14
array(11) { ["seconds"]=> int(25) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481985) }
Output for 5.0.0 - 5.0.2
array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(0) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409436000) }
Output for 4.3.1 - 4.4.9
array(11) { ["seconds"]=> int(26) ["minutes"]=> int(46) ["hours"]=> int(12) ["mday"]=> int(31) ["wday"]=> int(0) ["mon"]=> int(8) ["year"]=> int(2014) ["yday"]=> int(242) ["weekday"]=> string(6) "Sunday" ["month"]=> string(6) "August" [0]=> int(1409481986) }