3v4l.org

run code in 300+ PHP versions simultaneously
<?php $campeonato['hora_inicio'] = '15:59'; $campeonato['hora_fim'] = '17:59'; $horarios_possiveis = array ( $campeonato['hora_inicio'] ); $hor1 = DateTime::createFromFormat('!H:i', $campeonato['hora_inicio']); $hor2 = DateTime::createFromFormat('!H:i', $campeonato['hora_fim']); $interval = $hor1->diff($hor2); if (abs($interval->h) >= 2 ){ $horarios_possiveis[] = $campeonato['hora_fim']; } var_dump($horarios_possiveis);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 29, Position 2 = 32
Branch analysis from position: 29
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 32
filename:       /in/1A7EY
function name:  (null)
number of ops:  36
compiled vars:  !0 = $campeonato, !1 = $horarios_possiveis, !2 = $hor1, !3 = $hor2, !4 = $interval
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   ASSIGN_DIM                                               !0, 'hora_inicio'
          1        OP_DATA                                                  '15%3A59'
    3     2        ASSIGN_DIM                                               !0, 'hora_fim'
          3        OP_DATA                                                  '17%3A59'
    7     4        FETCH_DIM_R                                      ~7      !0, 'hora_inicio'
          5        INIT_ARRAY                                       ~8      ~7
    6     6        ASSIGN                                                   !1, ~8
   10     7        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
          8        SEND_VAL                                                 '%21H%3Ai'
          9        FETCH_DIM_R                                      ~10     !0, 'hora_inicio'
         10        SEND_VAL                                                 ~10
         11        DO_FCALL                                      0  $11     
         12        ASSIGN                                                   !2, $11
   11    13        INIT_STATIC_METHOD_CALL                                  'DateTime', 'createFromFormat'
         14        SEND_VAL                                                 '%21H%3Ai'
         15        FETCH_DIM_R                                      ~13     !0, 'hora_fim'
         16        SEND_VAL                                                 ~13
         17        DO_FCALL                                      0  $14     
         18        ASSIGN                                                   !3, $14
   13    19        INIT_METHOD_CALL                                         !2, 'diff'
         20        SEND_VAR_EX                                              !3
         21        DO_FCALL                                      0  $16     
         22        ASSIGN                                                   !4, $16
   15    23        INIT_FCALL                                               'abs'
         24        FETCH_OBJ_R                                      ~18     !4, 'h'
         25        SEND_VAL                                                 ~18
         26        DO_ICALL                                         $19     
         27        IS_SMALLER_OR_EQUAL                                      2, $19
         28      > JMPZ                                                     ~20, ->32
   16    29    >   FETCH_DIM_R                                      ~22     !0, 'hora_fim'
         30        ASSIGN_DIM                                               !1
         31        OP_DATA                                                  ~22
   20    32    >   INIT_FCALL                                               'var_dump'
         33        SEND_VAR                                                 !1
         34        DO_ICALL                                                 
         35      > RETURN                                                   1

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.6 ms | 1388 KiB | 17 Q