3v4l.org

run code in 300+ PHP versions simultaneously
<?php // Source: https://bugs.php.net/bug.php?id=63481 function f1() { f2(); $i = 0; yield $i; } function f2() { exit; } $rows = f1(); foreach ($rows as $row) { }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
2 jumps found. (Code = 78) Position 1 = 5, Position 2 = 6
Branch analysis from position: 5
1 jumps found. (Code = 42) Position 1 = 4
Branch analysis from position: 4
Branch analysis from position: 6
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 6
filename:       /in/hGc6Q
function name:  (null)
number of ops:  8
compiled vars:  !0 = $rows, !1 = $row
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   18     0  E >   INIT_FCALL                                               'f1'
          1        DO_FCALL                                      0  $2      
          2        ASSIGN                                                   !0, $2
   20     3      > FE_RESET_R                                       $4      !0, ->6
          4    > > FE_FETCH_R                                               $4, !1, ->6
          5    > > JMP                                                      ->4
          6    >   FE_FREE                                                  $4
   23     7      > RETURN                                                   1

Function f1:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/hGc6Q
function name:  f1
number of ops:  6
compiled vars:  !0 = $i
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
    6     1        INIT_FCALL_BY_NAME                                       'f2'
          2        DO_FCALL                                      0          
    8     3        ASSIGN                                                   !0, 0
   10     4        YIELD                                                    !0
   11     5      > GENERATOR_RETURN                                         

End of function f1

Function f2:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 79) Position 1 = -2
filename:       /in/hGc6Q
function name:  f2
number of ops:  2
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E > > EXIT                                                     
   16     1*     > RETURN                                                   null

End of function f2

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
156.53 ms | 1398 KiB | 14 Q