3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function getTimeLeft($start, $minutes) { $endTime = strtotime($start.' + '.$minutes." minutes"); return strtotime($endTime) - strtotime($start); } echo getTimeLeft('2015-09-06 21:00:39', '180');
based on J901r
Output for 5.4.7 - 5.4.45, 5.6.28, 7.0.20 - 7.2.0
152230732878
Output for 7.0.6
152219846478
Output for 5.6.14, 7.0.5
152217168078
Output for 7.0.4
152215180878
Output for 7.0.3
152215872078
Output for 7.0.2
152216217678
Output for 7.0.1
152216304078
Output for 7.0.0
152216563278
Output for 5.6.21
152219760078
Output for 5.6.20
152217772878
Output for 5.6.19
152214921678
Output for 5.6.18
152215526478
Output for 5.6.17
152215958478
Output for 5.6.16
152216649678
Output for 5.6.15
152216736078
Output for 5.6.13
152218291278
Output for 5.6.12
152218636878
Output for 5.6.11
152218982478
Output for 5.6.10
152219155278
Output for 5.6.9
152219328078
Output for 5.6.8
152219500878
Output for 5.6.7
152221747278
Output for 5.5.35
152221488078
Output for 5.5.34
152217859278
Output for 5.5.33
152215008078
Output for 5.5.32
152215699278
Output for 5.5.31
152216044878
Output for 5.5.30
152216995278
Output for 5.5.29
152218377678
Output for 5.5.28
152218723278
Output for 5.5.27
152218809678
Output for 5.5.26
152219241678
Output for 5.5.25
152219414478
Output for 5.5.24
152221574478
Output for 5.4.2 - 5.4.6
152235139278
Output for 5.3.17 - 5.3.29
152231942478