3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php print_r((new DateTime('September 2008'))->diff(new DateTime));
Output for 7.2.0
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.026146 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.10
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.002488 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.7
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.002879 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.6
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.007887 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.5
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.010904 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.0
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [f] => 0.00409 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.28, 7.0.20
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 14 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.6
DateInterval Object ( [y] => 7 [m] => 8 [d] => 19 [h] => 13 [i] => 34 [s] => 6 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2819 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.5
DateInterval Object ( [y] => 7 [m] => 7 [d] => 2 [h] => 9 [i] => 34 [s] => 5 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2771 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.4
DateInterval Object ( [y] => 7 [m] => 6 [d] => 7 [h] => 21 [i] => 40 [s] => 42 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2747 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.3
DateInterval Object ( [y] => 7 [m] => 6 [d] => 16 [h] => -1 [i] => 6 [s] => 25 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2755 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.2
DateInterval Object ( [y] => 7 [m] => 6 [d] => 20 [h] => 5 [i] => 19 [s] => 38 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2760 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.1
DateInterval Object ( [y] => 7 [m] => 6 [d] => 21 [h] => 8 [i] => 25 [s] => 23 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2761 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.0
DateInterval Object ( [y] => 7 [m] => 6 [d] => 24 [h] => 10 [i] => 18 [s] => 41 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2764 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.21
DateInterval Object ( [y] => 7 [m] => 8 [d] => 0 [h] => 16 [i] => 27 [s] => 36 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2800 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.20
DateInterval Object ( [y] => 7 [m] => 7 [d] => 9 [h] => 8 [i] => 36 [s] => 8 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2778 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.19
DateInterval Object ( [y] => 7 [m] => 6 [d] => 5 [h] => 5 [i] => 49 [s] => 31 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2745 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.18
DateInterval Object ( [y] => 7 [m] => 6 [d] => 12 [h] => 14 [i] => 47 [s] => 10 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2752 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.17
DateInterval Object ( [y] => 7 [m] => 6 [d] => 17 [h] => 2 [i] => 19 [s] => 47 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2757 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.16
DateInterval Object ( [y] => 7 [m] => 6 [d] => 25 [h] => 11 [i] => 8 [s] => 14 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2765 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.15
DateInterval Object ( [y] => 7 [m] => 6 [d] => 26 [h] => 11 [i] => 57 [s] => 10 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2766 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.14
DateInterval Object ( [y] => 7 [m] => 7 [d] => 13 [h] => 17 [i] => 40 [s] => 3 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2782 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.13
DateInterval Object ( [y] => 7 [m] => 7 [d] => 14 [h] => 18 [i] => 19 [s] => 6 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2783 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.12
DateInterval Object ( [y] => 7 [m] => 7 [d] => 19 [h] => 8 [i] => 48 [s] => 20 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2788 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.11
DateInterval Object ( [y] => 7 [m] => 7 [d] => 23 [h] => 15 [i] => 14 [s] => 30 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2792 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.10
DateInterval Object ( [y] => 7 [m] => 7 [d] => 24 [h] => 17 [i] => 20 [s] => 12 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2793 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.9
DateInterval Object ( [y] => 7 [m] => 7 [d] => 26 [h] => 22 [i] => 46 [s] => 32 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2795 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.8
DateInterval Object ( [y] => 7 [m] => 7 [d] => 29 [h] => 7 [i] => 16 [s] => 4 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2798 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.35
DateInterval Object ( [y] => 7 [m] => 8 [d] => 21 [h] => 2 [i] => 29 [s] => 8 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2821 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.34
DateInterval Object ( [y] => 7 [m] => 7 [d] => 10 [h] => 10 [i] => 50 [s] => 3 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2779 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.33
DateInterval Object ( [y] => 7 [m] => 6 [d] => 6 [h] => 8 [i] => 48 [s] => 35 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2746 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.32
DateInterval Object ( [y] => 7 [m] => 6 [d] => 14 [h] => 18 [i] => 44 [s] => 12 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2754 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.31
DateInterval Object ( [y] => 7 [m] => 6 [d] => 18 [h] => 5 [i] => 29 [s] => 43 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2758 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.30
DateInterval Object ( [y] => 7 [m] => 7 [d] => 0 [h] => 13 [i] => 49 [s] => 19 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2769 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.29
DateInterval Object ( [y] => 7 [m] => 7 [d] => 16 [h] => 8 [i] => 36 [s] => 51 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2785 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.28
DateInterval Object ( [y] => 7 [m] => 7 [d] => 20 [h] => 12 [i] => 7 [s] => 36 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2789 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.27
DateInterval Object ( [y] => 7 [m] => 7 [d] => 21 [h] => 13 [i] => 45 [s] => 10 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2790 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.26
DateInterval Object ( [y] => 7 [m] => 7 [d] => 25 [h] => 20 [i] => 1 [s] => 30 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2794 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.25
DateInterval Object ( [y] => 7 [m] => 7 [d] => 28 [h] => 3 [i] => 27 [s] => 14 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2797 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.24
DateInterval Object ( [y] => 7 [m] => 8 [d] => 22 [h] => 9 [i] => 50 [s] => 10 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2822 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.45
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 19 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.44
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 20 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.42 - 5.4.43
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 21 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.41
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 22 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.40
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 23 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.39
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 24 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.37 - 5.4.38
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 25 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.35 - 5.4.36
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 26 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.34
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 27 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.31 - 5.4.32
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 28 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.27 - 5.4.30
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 29 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.23 - 5.4.26
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 30 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.20 - 5.4.22
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 31 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.18 - 5.4.19
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 32 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.17
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 33 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 2686 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.15 - 5.4.16
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 33 [invert] => 0 [days] => 2686 )
Output for 5.4.12 - 5.4.14
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 34 [invert] => 0 [days] => 2686 )
Output for 5.4.11
DateInterval Object ( [y] => 7 [m] => 4 [d] => 8 [h] => 12 [i] => 21 [s] => 35 [invert] => 0 [days] => 2686 )
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /in/vSWGm on line 3
Process exited with code 255.