3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ETA($ArrivalDate){ $currentDate = new DateTime(); $arrivalDate = new DateTime($ArrivalDate); $interval = $currentDate->diff($arrivalDate); return $interval->format('%m'); } echo ETA('2013-06-01');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjS6V
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   INIT_FCALL                                               'eta'
          1        SEND_VAL                                                 '2013-06-01'
          2        DO_FCALL                                      0  $0      
          3        ECHO                                                     $0
          4      > RETURN                                                   1

Function eta:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WjS6V
function name:  ETA
number of ops:  17
compiled vars:  !0 = $ArrivalDate, !1 = $currentDate, !2 = $arrivalDate, !3 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
    3     1        NEW                                              $4      'DateTime'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !1, $4
    4     4        NEW                                              $7      'DateTime'
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0          
          7        ASSIGN                                                   !2, $7
    5     8        INIT_METHOD_CALL                                         !1, 'diff'
          9        SEND_VAR_EX                                              !2
         10        DO_FCALL                                      0  $10     
         11        ASSIGN                                                   !3, $10
    6    12        INIT_METHOD_CALL                                         !3, 'format'
         13        SEND_VAL_EX                                              '%25m'
         14        DO_FCALL                                      0  $12     
         15      > RETURN                                                   $12
    7    16*     > RETURN                                                   null

End of function eta

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.07 ms | 1398 KiB | 14 Q