3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php //$writer = new XMLWriter(); echo var_dump(getdate(strtotime("7 days"))); //echo date("Y-m-t", strtotime("2013-2")); //echo date("Y-m-t", strtotime("first day of previous month") ) ;
based on 3pKWF
Output for 5.6.28, 7.0.14 - 7.1.0
array(11) { ["seconds"]=> int(46) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390206) }
Output for 7.0.6
array(11) { ["seconds"]=> int(21) ["minutes"]=> int(23) ["hours"]=> int(8) ["mday"]=> int(10) ["wday"]=> int(2) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(130) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(3) "May" [0]=> int(1462861401) }
Output for 7.0.5
array(11) { ["seconds"]=> int(48) ["minutes"]=> int(19) ["hours"]=> int(21) ["mday"]=> int(9) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(99) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1460229588) }
Output for 7.0.4
array(11) { ["seconds"]=> int(57) ["minutes"]=> int(38) ["hours"]=> int(7) ["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(1458196737) }
Output for 7.0.3
array(11) { ["seconds"]=> int(12) ["minutes"]=> int(12) ["hours"]=> int(8) ["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(1458889932) }
Output for 7.0.2
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(57) ["hours"]=> int(13) ["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(1459252650) }
Output for 7.0.1
array(11) { ["seconds"]=> int(48) ["minutes"]=> int(59) ["hours"]=> int(18) ["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(1459357188) }
Output for 7.0.0
array(11) { ["seconds"]=> int(20) ["minutes"]=> int(36) ["hours"]=> int(20) ["mday"]=> int(2) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(92) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1459622180) }
Output for hhvm-3.12.0
array(11) { ["seconds"]=> int(38) ["minutes"]=> int(54) ["hours"]=> int(3) ["mday"]=> int(8) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(98) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1460080478) }
Output for hhvm-3.10.0

Process exited with code 153.
Output for 5.6.21
array(11) { ["seconds"]=> int(18) ["minutes"]=> int(43) ["hours"]=> int(3) ["mday"]=> int(9) ["wday"]=> int(1) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(129) ["weekday"]=> string(6) "Monday" ["month"]=> string(3) "May" [0]=> int(1462758198) }
Output for 5.6.20
array(11) { ["seconds"]=> int(44) ["minutes"]=> int(12) ["hours"]=> int(20) ["mday"]=> int(16) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(106) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1460830364) }
Output for 5.6.19
array(11) { ["seconds"]=> int(59) ["minutes"]=> int(45) ["hours"]=> int(15) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(73) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "March" [0]=> int(1457966759) }
Output for 5.6.18
array(11) { ["seconds"]=> int(2) ["minutes"]=> int(32) ["hours"]=> int(23) ["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(1458599522) }
Output for 5.6.17
array(11) { ["seconds"]=> int(29) ["minutes"]=> int(30) ["hours"]=> int(12) ["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(1458991829) }
Output for 5.6.16
array(11) { ["seconds"]=> int(17) ["minutes"]=> int(22) ["hours"]=> int(22) ["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(1459714937) }
Output for 5.6.15
array(11) { ["seconds"]=> int(8) ["minutes"]=> int(15) ["hours"]=> int(23) ["mday"]=> int(4) ["wday"]=> int(1) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(94) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "April" [0]=> int(1459804508) }
Output for 5.6.14
array(11) { ["seconds"]=> int(2) ["minutes"]=> int(49) ["hours"]=> int(1) ["mday"]=> int(9) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(99) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1460159342) }
Output for 5.6.13
array(11) { ["seconds"]=> int(36) ["minutes"]=> int(44) ["hours"]=> int(5) ["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(1461296676) }
Output for 5.6.12
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(22) ["hours"]=> int(19) ["mday"]=> int(26) ["wday"]=> int(2) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(116) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "April" [0]=> int(1461691371) }
Output for 5.6.11
array(11) { ["seconds"]=> int(56) ["minutes"]=> int(23) ["hours"]=> int(2) ["mday"]=> int(30) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(120) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1461975836) }
Output for 5.6.10
array(11) { ["seconds"]=> int(47) ["minutes"]=> int(12) ["hours"]=> int(4) ["mday"]=> int(2) ["wday"]=> int(1) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(122) ["weekday"]=> string(6) "Monday" ["month"]=> string(3) "May" [0]=> int(1462155167) }
Output for 5.6.9
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(10) ["hours"]=> int(9) ["mday"]=> int(4) ["wday"]=> int(3) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(124) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(3) "May" [0]=> int(1462345822) }
Output for 5.6.8
array(11) { ["seconds"]=> int(32) ["minutes"]=> int(11) ["hours"]=> int(17) ["mday"]=> int(6) ["wday"]=> int(5) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(126) ["weekday"]=> string(6) "Friday" ["month"]=> string(3) "May" [0]=> int(1462547492) }
Output for 5.6.7
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(0) ["hours"]=> int(12) ["mday"]=> int(1) ["wday"]=> int(3) ["mon"]=> int(6) ["year"]=> int(2016) ["yday"]=> int(152) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(4) "June" [0]=> int(1464775250) }
Output for 5.5.35
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(25) ["hours"]=> int(7) ["mday"]=> int(29) ["wday"]=> int(0) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(149) ["weekday"]=> string(6) "Sunday" ["month"]=> string(3) "May" [0]=> int(1464499530) }
Output for 5.5.34
array(11) { ["seconds"]=> int(25) ["minutes"]=> int(36) ["hours"]=> int(22) ["mday"]=> int(17) ["wday"]=> int(0) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(107) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "April" [0]=> int(1460925385) }
Output for 5.5.33
array(11) { ["seconds"]=> int(6) ["minutes"]=> int(35) ["hours"]=> int(18) ["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(1458063306) }
Output for 5.5.32
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(23) ["hours"]=> int(1) ["mday"]=> int(24) ["wday"]=> int(4) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(83) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "March" [0]=> int(1458779007) }
Output for 5.5.31
array(11) { ["seconds"]=> int(11) ["minutes"]=> int(17) ["hours"]=> int(15) ["mday"]=> int(27) ["wday"]=> int(0) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(86) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "March" [0]=> int(1459084631) }
Output for 5.5.30
array(11) { ["seconds"]=> int(18) ["minutes"]=> int(23) ["hours"]=> int(1) ["mday"]=> int(8) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(98) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1460071398) }
Output for 5.5.29
array(11) { ["seconds"]=> int(42) ["minutes"]=> int(49) ["hours"]=> int(19) ["mday"]=> int(23) ["wday"]=> int(6) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(113) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "April" [0]=> int(1461433782) }
Output for 5.5.28
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(28) ["hours"]=> int(22) ["mday"]=> int(27) ["wday"]=> int(3) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(117) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "April" [0]=> int(1461788930) }
Output for 5.5.27
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(59) ["hours"]=> int(0) ["mday"]=> int(29) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(119) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1461884362) }
Output for 5.5.26
array(11) { ["seconds"]=> int(36) ["minutes"]=> int(38) ["hours"]=> int(6) ["mday"]=> int(3) ["wday"]=> int(2) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(123) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(3) "May" [0]=> int(1462250316) }
Output for 5.5.25
array(11) { ["seconds"]=> int(8) ["minutes"]=> int(42) ["hours"]=> int(12) ["mday"]=> int(5) ["wday"]=> int(4) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(125) ["weekday"]=> string(8) "Thursday" ["month"]=> string(3) "May" [0]=> int(1462444928) }
Output for 5.5.24
array(11) { ["seconds"]=> int(33) ["minutes"]=> int(40) ["hours"]=> int(19) ["mday"]=> int(30) ["wday"]=> int(1) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(150) ["weekday"]=> string(6) "Monday" ["month"]=> string(3) "May" [0]=> int(1464630033) }
Output for 5.4.45
array(11) { ["seconds"]=> int(57) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196237) }
Output for 5.4.44
array(11) { ["seconds"]=> int(54) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196234) }
Output for 5.4.43
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196230) }
Output for 5.4.42
array(11) { ["seconds"]=> int(49) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196229) }
Output for 5.4.41
array(11) { ["seconds"]=> int(47) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196227) }
Output for 5.4.40
array(11) { ["seconds"]=> int(46) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196226) }
Output for 5.4.39
array(11) { ["seconds"]=> int(44) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196224) }
Output for 5.4.38
array(11) { ["seconds"]=> int(43) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196223) }
Output for 5.4.37
array(11) { ["seconds"]=> int(41) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196221) }
Output for 5.4.36
array(11) { ["seconds"]=> int(40) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196220) }
Output for 5.4.35
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196219) }
Output for 5.4.17 - 5.4.34
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390211) }
Output for 5.3.26 - 5.4.16
array(11) { ["seconds"]=> int(52) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390212) }
Output for 5.3.4 - 5.3.25
array(11) { ["seconds"]=> int(53) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390213) }
Output for 5.1.2 - 5.3.3
array(11) { ["seconds"]=> int(54) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390214) }
Output for 4.3.1 - 4.4.9, 5.0.3 - 5.0.5, 5.1.1
array(11) { ["seconds"]=> int(55) ["minutes"]=> int(56) ["hours"]=> int(20) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415390215) }
Output for 5.1.0
Fatal error: fatal flex scanner internal error--end of buffer missed in /in/QSQ0q on line 5
Process exited with code 255.
Output for 5.0.0 - 5.0.2
array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(0) ["mday"]=> int(7) ["wday"]=> int(5) ["mon"]=> int(11) ["year"]=> int(2014) ["yday"]=> int(310) ["weekday"]=> string(6) "Friday" ["month"]=> string(8) "November" [0]=> int(1415314800) }
Output for 4.3.0
array(11) { ["seconds"]=> int(45) ["minutes"]=> int(3) ["hours"]=> int(4) ["mday"]=> int(14) ["wday"]=> int(1) ["mon"]=> int(9) ["year"]=> int(2015) ["yday"]=> int(256) ["weekday"]=> string(6) "Monday" ["month"]=> string(9) "September" [0]=> int(1442196225) }