3v4l.org

run code in 300+ PHP versions simultaneously
<?php function ETA($ArrivalDate){ $currentDate = new DateTime('2013-10-01'); $arrivalDate = new DateTime($ArrivalDate); $interval = $currentDate->diff($arrivalDate); return $interval->format('%m'); } echo ETA('2013-10-01');
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/WIoA3
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-10-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/WIoA3
function name:  ETA
number of ops:  18
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        SEND_VAL_EX                                              '2013-10-01'
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !1, $4
    4     5        NEW                                              $7      'DateTime'
          6        SEND_VAR_EX                                              !0
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !2, $7
    5     9        INIT_METHOD_CALL                                         !1, 'diff'
         10        SEND_VAR_EX                                              !2
         11        DO_FCALL                                      0  $10     
         12        ASSIGN                                                   !3, $10
    6    13        INIT_METHOD_CALL                                         !3, 'format'
         14        SEND_VAL_EX                                              '%25m'
         15        DO_FCALL                                      0  $12     
         16      > RETURN                                                   $12
    7    17*     > RETURN                                                   null

End of function eta

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.02 ms | 1397 KiB | 14 Q