3v4l.org

run code in 300+ PHP versions simultaneously
<?php function getTimeLeft($start, $minutes) { $endTime = strtotime($start.' + '.$minutes." minutes"); return $endTime - strtotime("now"); } 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/VUs6D
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/VUs6D
function name:  getTimeLeft
number of ops:  15
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        CONCAT                                           ~3      !0, '+%2B+'
          4        CONCAT                                           ~4      ~3, !1
          5        CONCAT                                           ~5      ~4, '+minutes'
          6        SEND_VAL                                                 ~5
          7        DO_ICALL                                         $6      
          8        ASSIGN                                                   !2, $6
    5     9        INIT_FCALL                                               'strtotime'
         10        SEND_VAL                                                 'now'
         11        DO_ICALL                                         $8      
         12        SUB                                              ~9      !2, $8
         13      > RETURN                                                   ~9
    6    14*     > RETURN                                                   null

End of function gettimeleft

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.76 ms | 1397 KiB | 16 Q