3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $now = new DateTime; $dt = DateTime::createFromFormat('Y-m-d H:i:s', '0000-00-00 00:00:00'); print_r($dt->diff($now));
based on DO471
Output for 7.2.0
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.008195 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.10
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.074981 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.7
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.003331 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.6
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.014529 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.5
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.013479 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.1.0
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [f] => 0.003951 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [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] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 38 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.6
DateInterval Object ( [y] => 2016 [m] => 5 [d] => 3 [h] => 17 [i] => 59 [s] => 45 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736484 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.5
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 4 [h] => 6 [i] => 27 [s] => 20 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736454 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.4
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 9 [h] => 17 [i] => 32 [s] => 31 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736430 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.3
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 17 [h] => 18 [i] => 35 [s] => 39 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736438 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.2
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 22 [h] => 0 [i] => 45 [s] => 5 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736443 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.1
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 23 [h] => 4 [i] => 28 [s] => 33 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736444 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 7.0.0
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 26 [h] => 7 [i] => 5 [s] => 13 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736447 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.21
DateInterval Object ( [y] => 2016 [m] => 5 [d] => 2 [h] => 13 [i] => 10 [s] => 32 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736483 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.20
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 11 [h] => 5 [i] => 26 [s] => 35 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736461 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.19
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 7 [h] => 1 [i] => 42 [s] => 49 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736428 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.18
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 14 [h] => 10 [i] => 24 [s] => 52 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736435 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.17
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 18 [h] => 22 [i] => 5 [s] => 26 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736439 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.16
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 27 [h] => 7 [i] => 52 [s] => 18 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736448 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.15
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 28 [h] => 8 [i] => 43 [s] => 5 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736449 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.14
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 3 [h] => 10 [i] => 36 [s] => 1 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736453 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.13
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 16 [h] => 14 [i] => 57 [s] => 5 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736466 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.12
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 21 [h] => 5 [i] => 25 [s] => 47 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736471 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.11
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 25 [h] => 11 [i] => 41 [s] => 46 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736475 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.10
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 26 [h] => 13 [i] => 51 [s] => 18 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736476 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.9
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 28 [h] => 19 [i] => 1 [s] => 1 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736478 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.6.8
DateInterval Object ( [y] => 2016 [m] => 5 [d] => 0 [h] => 3 [i] => 54 [s] => 17 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736481 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.35
DateInterval Object ( [y] => 2016 [m] => 5 [d] => 22 [h] => 19 [i] => 36 [s] => 6 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736503 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.34
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 12 [h] => 7 [i] => 38 [s] => 40 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736462 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.33
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 8 [h] => 4 [i] => 20 [s] => 26 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736429 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.32
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 16 [h] => 14 [i] => 2 [s] => 53 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736437 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.31
DateInterval Object ( [y] => 2016 [m] => 3 [d] => 20 [h] => 1 [i] => 4 [s] => 31 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736441 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.30
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 2 [h] => 10 [i] => 36 [s] => 36 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736452 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.29
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 18 [h] => 5 [i] => 21 [s] => 16 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736468 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.28
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 22 [h] => 8 [i] => 38 [s] => 54 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736472 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.27
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 23 [h] => 10 [i] => 27 [s] => 39 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736473 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.26
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 27 [h] => 16 [i] => 34 [s] => 9 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736477 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.25
DateInterval Object ( [y] => 2016 [m] => 4 [d] => 29 [h] => 23 [i] => 25 [s] => 13 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736479 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.5.24
DateInterval Object ( [y] => 2016 [m] => 5 [d] => 24 [h] => 5 [i] => 59 [s] => 43 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736505 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.39 - 5.4.45
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 45 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.31 - 5.4.38
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 46 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.25 - 5.4.30
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 47 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.24
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 18 [i] => 58 [s] => 48 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.17 - 5.4.23
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 48 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.4.16
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 48 [invert] => 0 [days] => 736297 )
Output for 5.4.5 - 5.4.15
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 49 [invert] => 0 [days] => 736297 )
Output for 5.3.24 - 5.3.26, 5.4.0 - 5.4.4
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 50 [invert] => 0 [days] => 736297 )
Output for 5.3.27 - 5.3.29
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 50 [weekday] => 0 [weekday_behavior] => 0 [first_last_day_of] => 0 [invert] => 0 [days] => 736297 [special_type] => 0 [special_amount] => 0 [have_weekday_relative] => 0 [have_special_relative] => 0 )
Output for 5.3.19 - 5.3.23
DateInterval Object ( [y] => 2015 [m] => 10 [d] => 29 [h] => 19 [i] => 38 [s] => 51 [invert] => 0 [days] => 736297 )