3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $time = 1540511772; $difference = new DateTime(); $difference->setTimeStamp($time + '2592000'); $difference = $difference->diff(new DateTime()); print_r($difference);
Output for 7.2.11
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.010399 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.10
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.010526 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.9
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.014811 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.8
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.010409 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.7
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.007512 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.6
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.014615 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.5
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.014566 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.4
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.006078 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.3
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.011075 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.2
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.014269 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.1
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.009557 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.2.0
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.003097 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.23
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.008101 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.22
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.011253 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.21
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.008158 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.20
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.009375 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.19
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.016325 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.18
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.013948 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.17
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.018396 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.16
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.013903 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.15
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.016343 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.14
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.011441 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.13
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.010132 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.12
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.01612 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.11
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.01219 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.10
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.017762 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.9
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.013875 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.8
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.028727 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.7
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.016378 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.6
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.036319 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.5
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.037305 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.4
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.032957 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.3
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => 0 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.2
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.045223 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.1
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.004094 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.0
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [f] => -0.011692 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.38 - 7.0.28
DateInterval Object ( [y] => 0 [m] => 0 [d] => 29 [h] => 22 [i] => 53 [s] => 32 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 1 [days] => 29 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )