3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getTimeLeft($start, $minutes) { $endTime = strtotime($start + $minutes."minutes"); return strtotime($endTime) - strtotime($start); } echo getTimeLeft('2015-09-06 21:00:39', '180');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbd8T
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INIT_FCALL                                               'gettimeleft'
          1        SEND_VAL                                                 '2015-09-06+21%3A00%3A39'
          2        SEND_VAL                                                 '180'
          3        DO_FCALL                                      0  $0      
          4        ECHO                                                     $0
          5      > RETURN                                                   1

Function gettimeleft:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/gbd8T
function name:  getTimeLeft
number of ops:  17
compiled vars:  !0 = $start, !1 = $minutes, !2 = $endTime
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        INIT_FCALL                                               'strtotime'
          3        ADD                                              ~3      !0, !1
          4        CONCAT                                           ~4      ~3, 'minutes'
          5        SEND_VAL                                                 ~4
          6        DO_ICALL                                         $5      
          7        ASSIGN                                                   !2, $5
    5     8        INIT_FCALL                                               'strtotime'
          9        SEND_VAR                                                 !2
         10        DO_ICALL                                         $7      
         11        INIT_FCALL                                               'strtotime'
         12        SEND_VAR                                                 !0
         13        DO_ICALL                                         $8      
         14        SUB                                              ~9      $7, $8
         15      > RETURN                                                   ~9
    6    16*     > RETURN                                                   null

End of function gettimeleft

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.34 ms | 1398 KiB | 16 Q