3v4l.org

run code in 300+ PHP versions simultaneously
<?php function gen1(){ for($i=0;$i<=10;$i++){ yield $i; } echo "OK!"; } function gen2(){ for($i=0;$i<=10;$i++){ yield $i; } echo "OK2"; } echo gen1(); echo gen2();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iEqCs
function name:  (null)
number of ops:  7
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'gen1'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   19     3        INIT_FCALL                                               'gen2'
          4        DO_FCALL                                      0  $1      
          5        ECHO                                                     $1
          6      > RETURN                                                   1

Function gen1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/iEqCs
function name:  gen1
number of ops:  9
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
    4     1        ASSIGN                                                   !0, 0
          2      > JMP                                                      ->5
    5     3    >   YIELD                                                    !0
    4     4        PRE_INC                                                  !0
          5    >   IS_SMALLER_OR_EQUAL                                      !0, 10
          6      > JMPNZ                                                    ~4, ->3
    7     7    >   ECHO                                                     'OK%21'
    8     8      > GENERATOR_RETURN                                         

End of function gen1

Function gen2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 42) Position 1 = 5
Branch analysis from position: 5
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
2 jumps found. (Code = 44) Position 1 = 7, Position 2 = 3
Branch analysis from position: 7
Branch analysis from position: 3
filename:       /in/iEqCs
function name:  gen2
number of ops:  9
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   GENERATOR_CREATE                                         
   11     1        ASSIGN                                                   !0, 0
          2      > JMP                                                      ->5
   12     3    >   YIELD                                                    !0
   11     4        PRE_INC                                                  !0
          5    >   IS_SMALLER_OR_EQUAL                                      !0, 10
          6      > JMPNZ                                                    ~4, ->3
   15     7    >   ECHO                                                     'OK2'
   16     8      > GENERATOR_RETURN                                         

End of function gen2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.25 ms | 1403 KiB | 15 Q