3v4l.org

run code in 300+ PHP versions simultaneously
<?php function loop_prologue() { printf("starting loop\n"); } function loop_epilogue() { printf("terminating loop\n"); } function loop_iter() { printf("iteration\n"); } $x = 3; for ( loop_prologue(); ($x-- >= 1) || (loop_epilogue()); loop_iter() );
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
2 jumps found. (Code = 44) Position 1 = 13, Position 2 = 4
Branch analysis from position: 13
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 9, Position 2 = 12
Branch analysis from position: 9
Branch analysis from position: 12
Branch analysis from position: 12
filename:       /in/L0KJ8
function name:  (null)
number of ops:  14
compiled vars:  !0 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ASSIGN                                                   !0, 3
   10     1        INIT_FCALL                                               'loop_prologue'
          2        DO_FCALL                                      0          
          3      > JMP                                                      ->6
   12     4    >   INIT_FCALL                                               'loop_iter'
          5        DO_FCALL                                      0          
   11     6    >   POST_DEC                                         ~4      !0
          7        IS_SMALLER_OR_EQUAL                              ~5      1, ~4
          8      > JMPNZ_EX                                         ~5      ~5, ->12
          9    >   INIT_FCALL                                               'loop_epilogue'
         10        DO_FCALL                                      0  $6      
         11        BOOL                                             ~5      $6
         12    > > JMPNZ                                                    ~5, ->4
   13    13    > > RETURN                                                   1

Function loop_prologue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L0KJ8
function name:  loop_prologue
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   INIT_FCALL                                               'printf'
          1        SEND_VAL                                                 'starting+loop%0A'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function loop_prologue

Function loop_epilogue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L0KJ8
function name:  loop_epilogue
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   INIT_FCALL                                               'printf'
          1        SEND_VAL                                                 'terminating+loop%0A'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function loop_epilogue

Function loop_iter:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/L0KJ8
function name:  loop_iter
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   INIT_FCALL                                               'printf'
          1        SEND_VAL                                                 'iteration%0A'
          2        DO_ICALL                                                 
          3      > RETURN                                                   null

End of function loop_iter

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
180.33 ms | 1403 KiB | 18 Q