3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getTimeLeft($start, $minutes) { $endTime = strtotime($start.' + '.$minutes." minutes"); return $endTime - strtotime("now"); } echo getTimeLeft('2015-09-06 21:00:39', '180');
based on nkMhl
Output for 5.6.28, 7.0.20 - 7.2.0
13565
Output for 7.0.6
-20675367
Output for 7.0.5
-18043759
Output for 7.0.4
-16010367
Output for 7.0.3
-16703241
Output for 7.0.2
-17068810
Output for 7.0.1
-17174466
Output for 7.0.0
-17439762
Output for 5.6.21
-20572010
Output for 5.6.20
-18634665
Output for 5.6.19
-15756614
Output for 5.6.18
-16407705
Output for 5.6.17
-16805235
Output for 5.6.16
-17528860
Output for 5.6.15
-17618392
Output for 5.6.14
-17972891
Output for 5.6.13
-19110743
Output for 5.6.12
-19505099
Output for 5.6.11
-19789376
Output for 5.6.10
-19968867
Output for 5.6.9
-20159574
Output for 5.6.8
-20360924
Output for 5.6.7
-22580083
Output for 5.5.35
-22313073
Output for 5.5.34
-18739415
Output for 5.5.33
-15876832
Output for 5.5.32
-16589783
Output for 5.5.31
-16901751
Output for 5.5.30
-17884748
Output for 5.5.29
-19247840
Output for 5.5.28
-19602563
Output for 5.5.27
-19697737
Output for 5.5.26
-20064042
Output for 5.5.25
-20258601
Output for 5.5.24
-22443515
Output for 5.4.40 - 5.4.45
13554
Output for 5.4.32 - 5.4.39
13553
Output for 5.4.25 - 5.4.31
13552
Output for 5.4.19 - 5.4.24
13551
Output for 5.4.12 - 5.4.18
13550
Output for 5.4.7 - 5.4.11
13549
Output for 5.4.6
-4334749
Output for 5.4.5
-4340273
Output for 5.4.4
-4345875
Output for 5.4.3
-4351948
Output for 5.4.2
-4358253
Output for 5.3.28 - 5.3.29
-1180736
Output for 5.3.26 - 5.3.27
-1180735
Output for 5.3.24 - 5.3.25
-1180734
Output for 5.3.22 - 5.3.23
-1180733
Output for 5.3.20 - 5.3.21
-1180732
Output for 5.3.18 - 5.3.19
-1180731
Output for 5.3.17
-1180730