3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $d =getdate(); for($i=1;$i<=12;$i++){ if($i==$d["mon"]){ var_dump($d); } }
based on YpA28
Output for 5.6.28, 7.0.20 - 7.2.0
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844987) }
Output for 7.0.6
array(11) { ["seconds"]=> int(8) ["minutes"]=> int(50) ["hours"]=> int(17) ["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(1462290608) }
Output for 7.0.5
array(11) { ["seconds"]=> int(48) ["minutes"]=> int(17) ["hours"]=> int(6) ["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(1459657068) }
Output for 7.0.4
array(11) { ["seconds"]=> int(24) ["minutes"]=> int(0) ["hours"]=> int(18) ["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(1457629224) }
Output for 7.0.3
array(11) { ["seconds"]=> int(6) ["minutes"]=> int(50) ["hours"]=> int(18) ["mday"]=> int(18) ["wday"]=> int(5) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(77) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "March" [0]=> int(1458323406) }
Output for 7.0.2
array(11) { ["seconds"]=> int(53) ["minutes"]=> int(13) ["hours"]=> int(1) ["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(1458692033) }
Output for 7.0.1
array(11) { ["seconds"]=> int(44) ["minutes"]=> int(58) ["hours"]=> int(4) ["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(1458791924) }
Output for 7.0.0
array(11) { ["seconds"]=> int(23) ["minutes"]=> int(55) ["hours"]=> int(6) ["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(1459054523) }
Output for 5.6.21
array(11) { ["seconds"]=> int(25) ["minutes"]=> int(0) ["hours"]=> int(13) ["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(1462186825) }
Output for 5.6.20
array(11) { ["seconds"]=> int(59) ["minutes"]=> int(16) ["hours"]=> int(5) ["mday"]=> int(10) ["wday"]=> int(0) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(100) ["weekday"]=> string(6) "Sunday" ["month"]=> string(5) "April" [0]=> int(1460258219) }
Output for 5.6.19
array(11) { ["seconds"]=> int(36) ["minutes"]=> int(12) ["hours"]=> int(2) ["mday"]=> int(8) ["wday"]=> int(2) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(67) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(5) "March" [0]=> int(1457399556) }
Output for 5.6.18
array(11) { ["seconds"]=> int(1) ["minutes"]=> int(48) ["hours"]=> int(10) ["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(1458035281) }
Output for 5.6.17
array(11) { ["seconds"]=> int(2) ["minutes"]=> int(35) ["hours"]=> int(22) ["mday"]=> int(19) ["wday"]=> int(6) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(78) ["weekday"]=> string(8) "Saturday" ["month"]=> string(5) "March" [0]=> int(1458423302) }
Output for 5.6.16
array(11) { ["seconds"]=> int(36) ["minutes"]=> int(42) ["hours"]=> int(7) ["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(1459143756) }
Output for 5.6.15
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(33) ["hours"]=> int(8) ["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(1459233210) }
Output for 5.6.14
array(11) { ["seconds"]=> int(11) ["minutes"]=> int(27) ["hours"]=> int(10) ["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(1459585631) }
Output for 5.6.13
array(11) { ["seconds"]=> int(30) ["minutes"]=> int(47) ["hours"]=> int(14) ["mday"]=> int(15) ["wday"]=> int(5) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(105) ["weekday"]=> string(6) "Friday" ["month"]=> string(5) "April" [0]=> int(1460724450) }
Output for 5.6.12
array(11) { ["seconds"]=> int(42) ["minutes"]=> int(15) ["hours"]=> int(5) ["mday"]=> int(20) ["wday"]=> int(3) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(110) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "April" [0]=> int(1461122142) }
Output for 5.6.11
array(11) { ["seconds"]=> int(26) ["minutes"]=> int(31) ["hours"]=> int(11) ["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(1461490286) }
Output for 5.6.10
array(11) { ["seconds"]=> int(56) ["minutes"]=> int(40) ["hours"]=> int(13) ["mday"]=> int(25) ["wday"]=> int(1) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(115) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "April" [0]=> int(1461584456) }
Output for 5.6.9
array(11) { ["seconds"]=> int(39) ["minutes"]=> int(50) ["hours"]=> int(18) ["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(1461775839) }
Output for 5.6.8
array(11) { ["seconds"]=> int(52) ["minutes"]=> int(42) ["hours"]=> int(3) ["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(1461980572) }
Output for 5.5.35
array(11) { ["seconds"]=> int(47) ["minutes"]=> int(15) ["hours"]=> int(19) ["mday"]=> int(22) ["wday"]=> int(0) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(142) ["weekday"]=> string(6) "Sunday" ["month"]=> string(3) "May" [0]=> int(1463937347) }
Output for 5.5.34
array(11) { ["seconds"]=> int(27) ["minutes"]=> int(29) ["hours"]=> int(7) ["mday"]=> int(11) ["wday"]=> int(1) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(101) ["weekday"]=> string(6) "Monday" ["month"]=> string(5) "April" [0]=> int(1460352567) }
Output for 5.5.33
array(11) { ["seconds"]=> int(1) ["minutes"]=> int(49) ["hours"]=> int(4) ["mday"]=> int(9) ["wday"]=> int(3) ["mon"]=> int(3) ["year"]=> int(2016) ["yday"]=> int(68) ["weekday"]=> string(9) "Wednesday" ["month"]=> string(5) "March" [0]=> int(1457495341) }
Output for 5.5.32
array(11) { ["seconds"]=> int(0) ["minutes"]=> int(32) ["hours"]=> int(14) ["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(1458221520) }
Output for 5.5.31
array(11) { ["seconds"]=> int(22) ["minutes"]=> int(33) ["hours"]=> int(1) ["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(1458520402) }
Output for 5.5.30
array(11) { ["seconds"]=> int(5) ["minutes"]=> int(27) ["hours"]=> int(10) ["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(1459499225) }
Output for 5.5.29
array(11) { ["seconds"]=> int(37) ["minutes"]=> int(11) ["hours"]=> int(5) ["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(1460862697) }
Output for 5.5.28
array(11) { ["seconds"]=> int(28) ["minutes"]=> int(28) ["hours"]=> int(8) ["mday"]=> int(21) ["wday"]=> int(4) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(111) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "April" [0]=> int(1461220108) }
Output for 5.5.27
array(11) { ["seconds"]=> int(51) ["minutes"]=> int(17) ["hours"]=> int(10) ["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(1461313071) }
Output for 5.5.26
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(23) ["hours"]=> int(16) ["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(1461680630) }
Output for 5.5.25
array(11) { ["seconds"]=> int(50) ["minutes"]=> int(14) ["hours"]=> int(23) ["mday"]=> int(28) ["wday"]=> int(4) ["mon"]=> int(4) ["year"]=> int(2016) ["yday"]=> int(118) ["weekday"]=> string(8) "Thursday" ["month"]=> string(5) "April" [0]=> int(1461878090) }
Output for 5.5.24
array(11) { ["seconds"]=> int(21) ["minutes"]=> int(50) ["hours"]=> int(5) ["mday"]=> int(24) ["wday"]=> int(2) ["mon"]=> int(5) ["year"]=> int(2016) ["yday"]=> int(144) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(3) "May" [0]=> int(1464061821) }
Output for 5.4.43 - 5.4.45
array(11) { ["seconds"]=> int(33) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844993) }
Output for 5.4.30 - 5.4.42
array(11) { ["seconds"]=> int(34) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844994) }
Output for 5.4.18 - 5.4.29
array(11) { ["seconds"]=> int(35) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844995) }
Output for 5.4.5 - 5.4.17
array(11) { ["seconds"]=> int(36) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844996) }
Output for 5.3.24 - 5.4.4
array(11) { ["seconds"]=> int(37) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844997) }
Output for 5.3.19 - 5.3.23
array(11) { ["seconds"]=> int(38) ["minutes"]=> int(36) ["hours"]=> int(8) ["mday"]=> int(26) ["wday"]=> int(1) ["mon"]=> int(10) ["year"]=> int(2015) ["yday"]=> int(298) ["weekday"]=> string(6) "Monday" ["month"]=> string(7) "October" [0]=> int(1445844998) }