3v4l.org

run code in 300+ PHP versions simultaneously
<?php function dias_transcurridos($fecha_i,$fecha_f) { $formato="d-m-Y"; $dias = (createFromFormat($formato,$fecha_i)-createFromFormat($formato,$fecha_f))/86400; $dias = abs($dias); $dias = floor($dias); return $dias; }; dias_transcurridos(" 2014-06-01"," 2014-06-02");
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l7pUe
function name:  (null)
number of ops:  5
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   INIT_FCALL                                               'dias_transcurridos'
          1        SEND_VAL                                                 '+2014-06-01'
          2        SEND_VAL                                                 '+2014-06-02'
          3        DO_FCALL                                      0          
          4      > RETURN                                                   1

Function dias_transcurridos:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/l7pUe
function name:  dias_transcurridos
number of ops:  24
compiled vars:  !0 = $fecha_i, !1 = $fecha_f, !2 = $formato, !3 = $dias
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    4     2        ASSIGN                                                   !2, 'd-m-Y'
    6     3        INIT_FCALL_BY_NAME                                       'createFromFormat'
          4        SEND_VAR_EX                                              !2
          5        SEND_VAR_EX                                              !0
          6        DO_FCALL                                      0  $5      
          7        INIT_FCALL_BY_NAME                                       'createFromFormat'
          8        SEND_VAR_EX                                              !2
          9        SEND_VAR_EX                                              !1
         10        DO_FCALL                                      0  $6      
         11        SUB                                              ~7      $5, $6
         12        DIV                                              ~8      ~7, 86400
         13        ASSIGN                                                   !3, ~8
    7    14        INIT_FCALL                                               'abs'
         15        SEND_VAR                                                 !3
         16        DO_ICALL                                         $10     
         17        ASSIGN                                                   !3, $10
         18        INIT_FCALL                                               'floor'
         19        SEND_VAR                                                 !3
         20        DO_ICALL                                         $12     
         21        ASSIGN                                                   !3, $12
    8    22      > RETURN                                                   !3
    9    23*     > RETURN                                                   null

End of function dias_transcurridos

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
181.39 ms | 1399 KiB | 18 Q