3v4l.org

run code in 300+ PHP versions simultaneously
<?php function createEmptyGen1() { if(false) { yield 1; } } function createEmptyGen2() { if(false) { yield 2; } } $ai = new \AppendIterator(); $ai->append(createEmptyGen1()); $ai->append(createEmptyGen2()); foreach ($ai as $_);
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 14, Position 2 = 16
Branch analysis from position: 14
2 jumps found. (Code = 78) Position 1 = 15, Position 2 = 16
Branch analysis from position: 15
1 jumps found. (Code = 42) Position 1 = 14
Branch analysis from position: 14
Branch analysis from position: 16
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 16
filename:       /in/R4AH3
function name:  (null)
number of ops:  18
compiled vars:  !0 = $ai, !1 = $_
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   NEW                                              $2      'AppendIterator'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
    7     3        INIT_METHOD_CALL                                         !0, 'append'
          4        INIT_FCALL                                               'createemptygen1'
          5        DO_FCALL                                      0  $5      
          6        SEND_VAR_NO_REF_EX                                       $5
          7        DO_FCALL                                      0          
    8     8        INIT_METHOD_CALL                                         !0, 'append'
          9        INIT_FCALL                                               'createemptygen2'
         10        DO_FCALL                                      0  $7      
         11        SEND_VAR_NO_REF_EX                                       $7
         12        DO_FCALL                                      0          
   10    13      > FE_RESET_R                                       $9      !0, ->16
         14    > > FE_FETCH_R                                               $9, !1, ->16
         15    > > JMP                                                      ->14
         16    >   FE_FREE                                                  $9
         17      > RETURN                                                   1

Function createemptygen1:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
filename:       /in/R4AH3
function name:  createEmptyGen1
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                         
          1      > JMPZ                                                     <false>, ->3
          2    >   YIELD                                                    1
          3    > > GENERATOR_RETURN                                         

End of function createemptygen1

Function createemptygen2:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 43) Position 1 = 2, Position 2 = 3
Branch analysis from position: 2
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 3
filename:       /in/R4AH3
function name:  createEmptyGen2
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
          1      > JMPZ                                                     <false>, ->3
          2    >   YIELD                                                    2
          3    > > GENERATOR_RETURN                                         

End of function createemptygen2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
143.2 ms | 1399 KiB | 15 Q