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() ) { echo "$x\n"; }
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
2 jumps found. (Code = 44) Position 1 = 16, Position 2 = 4
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
2 jumps found. (Code = 47) Position 1 = 12, Position 2 = 15
Branch analysis from position: 12
Branch analysis from position: 15
Branch analysis from position: 15
filename:       /in/ZbpD1
function name:  (null)
number of ops:  17
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                                                      ->9
   15     4    >   NOP                                                      
          5        FAST_CONCAT                                      ~3      !0, '%0A'
          6        ECHO                                                     ~3
   12     7        INIT_FCALL                                               'loop_iter'
          8        DO_FCALL                                      0          
   11     9    >   POST_DEC                                         ~5      !0
         10        IS_SMALLER_OR_EQUAL                              ~6      1, ~5
         11      > JMPNZ_EX                                         ~6      ~6, ->15
         12    >   INIT_FCALL                                               'loop_epilogue'
         13        DO_FCALL                                      0  $7      
         14        BOOL                                             ~6      $7
         15    > > JMPNZ                                                    ~6, ->4
   16    16    > > RETURN                                                   1

Function loop_prologue:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/ZbpD1
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/ZbpD1
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/ZbpD1
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:
182.44 ms | 1407 KiB | 18 Q