3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $then = '2005-09-01 09:02:23'; $then = new DateTime($then); $now = new DateTime(); $sinceThen = $then->diff($now); //Combined echo $sinceThen->y.' years have passed.<br>'; echo $sinceThen->m.' months have passed.<br>'; echo $sinceThen->d.' days have passed.<br>'; echo $sinceThen->h.' hours have passed.<br>'; echo $sinceThen->i.' minutes have passed.<br>'; $sinceThen = $then->diff($now);
based on 3QVme
Output for 5.3.19 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
10 years have passed.<br>1 months have passed.<br>28 days have passed.<br>2 hours have passed.<br>56 minutes have passed.<br>
Output for 7.0.6
10 years have passed.<br>8 months have passed.<br>2 days have passed.<br>8 hours have passed.<br>56 minutes have passed.<br>
Output for 7.0.5
10 years have passed.<br>7 months have passed.<br>1 days have passed.<br>21 hours have passed.<br>24 minutes have passed.<br>
Output for 7.0.4
10 years have passed.<br>6 months have passed.<br>9 days have passed.<br>9 hours have passed.<br>9 minutes have passed.<br>
Output for 7.0.3
10 years have passed.<br>6 months have passed.<br>17 days have passed.<br>10 hours have passed.<br>12 minutes have passed.<br>
Output for 7.0.2
10 years have passed.<br>6 months have passed.<br>21 days have passed.<br>16 hours have passed.<br>21 minutes have passed.<br>
Output for 7.0.1
10 years have passed.<br>6 months have passed.<br>22 days have passed.<br>20 hours have passed.<br>5 minutes have passed.<br>
Output for 7.0.0
10 years have passed.<br>6 months have passed.<br>25 days have passed.<br>22 hours have passed.<br>2 minutes have passed.<br>
Output for 5.6.21
10 years have passed.<br>8 months have passed.<br>1 days have passed.<br>4 hours have passed.<br>7 minutes have passed.<br>
Output for 5.6.20
10 years have passed.<br>7 months have passed.<br>8 days have passed.<br>20 hours have passed.<br>23 minutes have passed.<br>
Output for 5.6.19
10 years have passed.<br>6 months have passed.<br>6 days have passed.<br>17 hours have passed.<br>19 minutes have passed.<br>
Output for 5.6.18
10 years have passed.<br>6 months have passed.<br>14 days have passed.<br>2 hours have passed.<br>1 minutes have passed.<br>
Output for 5.6.17
10 years have passed.<br>6 months have passed.<br>18 days have passed.<br>13 hours have passed.<br>42 minutes have passed.<br>
Output for 5.6.16
10 years have passed.<br>6 months have passed.<br>26 days have passed.<br>22 hours have passed.<br>49 minutes have passed.<br>
Output for 5.6.15
10 years have passed.<br>6 months have passed.<br>27 days have passed.<br>23 hours have passed.<br>40 minutes have passed.<br>
Output for 5.6.14
10 years have passed.<br>7 months have passed.<br>1 days have passed.<br>1 hours have passed.<br>33 minutes have passed.<br>
Output for 5.6.13
10 years have passed.<br>7 months have passed.<br>14 days have passed.<br>5 hours have passed.<br>54 minutes have passed.<br>
Output for 5.6.12
10 years have passed.<br>7 months have passed.<br>18 days have passed.<br>20 hours have passed.<br>22 minutes have passed.<br>
Output for 5.6.11
10 years have passed.<br>7 months have passed.<br>23 days have passed.<br>2 hours have passed.<br>38 minutes have passed.<br>
Output for 5.6.10
10 years have passed.<br>7 months have passed.<br>24 days have passed.<br>4 hours have passed.<br>48 minutes have passed.<br>
Output for 5.6.9
10 years have passed.<br>7 months have passed.<br>26 days have passed.<br>9 hours have passed.<br>57 minutes have passed.<br>
Output for 5.6.8
10 years have passed.<br>7 months have passed.<br>28 days have passed.<br>18 hours have passed.<br>51 minutes have passed.<br>
Output for 5.5.35
10 years have passed.<br>8 months have passed.<br>21 days have passed.<br>10 hours have passed.<br>32 minutes have passed.<br>
Output for 5.5.34
10 years have passed.<br>7 months have passed.<br>9 days have passed.<br>22 hours have passed.<br>35 minutes have passed.<br>
Output for 5.5.33
10 years have passed.<br>6 months have passed.<br>7 days have passed.<br>19 hours have passed.<br>57 minutes have passed.<br>
Output for 5.5.32
10 years have passed.<br>6 months have passed.<br>16 days have passed.<br>5 hours have passed.<br>39 minutes have passed.<br>
Output for 5.5.31
10 years have passed.<br>6 months have passed.<br>19 days have passed.<br>16 hours have passed.<br>41 minutes have passed.<br>
Output for 5.5.30
10 years have passed.<br>7 months have passed.<br>0 days have passed.<br>1 hours have passed.<br>33 minutes have passed.<br>
Output for 5.5.29
10 years have passed.<br>7 months have passed.<br>15 days have passed.<br>20 hours have passed.<br>18 minutes have passed.<br>
Output for 5.5.28
10 years have passed.<br>7 months have passed.<br>19 days have passed.<br>23 hours have passed.<br>35 minutes have passed.<br>
Output for 5.5.27
10 years have passed.<br>7 months have passed.<br>21 days have passed.<br>1 hours have passed.<br>24 minutes have passed.<br>
Output for 5.5.26
10 years have passed.<br>7 months have passed.<br>25 days have passed.<br>7 hours have passed.<br>31 minutes have passed.<br>
Output for 5.5.25
10 years have passed.<br>7 months have passed.<br>27 days have passed.<br>14 hours have passed.<br>22 minutes have passed.<br>
Output for 5.5.24
10 years have passed.<br>8 months have passed.<br>22 days have passed.<br>20 hours have passed.<br>56 minutes have passed.<br>