3v4l.org

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

End of function gettimeleft

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.94 ms | 1389 KiB | 16 Q