3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $last30Days = getdate(strtotime("30 days ago", $today[0])); var_dump($last30Days);
Output for 5.0.4 - 5.0.5, 5.1.3 - 7.1.0
Notice: Undefined variable: today in /in/jTAad on line 3 array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(1) ["mday"]=> int(2) ["wday"]=> int(2) ["mon"]=> int(12) ["year"]=> int(1969) ["yday"]=> int(335) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "December" [0]=> int(-2592000) }
Output for 5.1.0 - 5.1.2
Notice: Undefined variable: today in /in/jTAad on line 3 array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(1) ["mday"]=> int(1) ["wday"]=> int(4) ["mon"]=> int(1) ["year"]=> int(1970) ["yday"]=> int(0) ["weekday"]=> string(8) "Thursday" ["month"]=> string(7) "January" [0]=> int(0) }
Output for 4.3.0 - 4.4.9, 5.0.3
Notice: Undefined variable: today in /in/jTAad on line 3 array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(1) ["mday"]=> int(2) ["wday"]=> int(2) ["mon"]=> int(12) ["year"]=> int(1969) ["yday"]=> int(335) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "December" [0]=> int(-2592000) }
Output for 5.0.0 - 5.0.2
Notice: Undefined variable: today in /in/jTAad on line 3 array(11) { ["seconds"]=> int(0) ["minutes"]=> int(0) ["hours"]=> int(0) ["mday"]=> int(2) ["wday"]=> int(2) ["mon"]=> int(12) ["year"]=> int(1969) ["yday"]=> int(335) ["weekday"]=> string(7) "Tuesday" ["month"]=> string(8) "December" [0]=> int(-2595600) }