3v4l.org

run code in 500+ PHP versions simultaneously
<?php const from = ['yield from']; $a = fn () => yield yield from from; foreach($a() as $b) { print $b; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 9
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 9
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 9
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 9
filename:       /in/KiQGo
function name:  (null)
number of ops:  11
compiled vars:  !0 = $a, !1 = $b
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_CONST                                                'from', <array>
    5     1        DECLARE_LAMBDA_FUNCTION                              ~2      [0]
          2        ASSIGN                                                       !0, ~2
    7     3        INIT_DYNAMIC_CALL                                            !0
          4        DO_FCALL                                          0  $4      
          5      > FE_RESET_R                                           $5      $4, ->9
          6    > > FE_FETCH_R                                                   $5, !1, ->9
    8     7    >   ECHO                                                         !1
    7     8      > JMP                                                          ->6
          9    >   FE_FREE                                                      $5
    9    10      > RETURN                                                       1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 161) Position 1 = -2
filename:       /in/KiQGo
function name:  {closure:/in/KiQGo:5}
number of ops:  6
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    5     0  E >   GENERATOR_CREATE                                             
          1        FETCH_CONSTANT                                       ~0      'from'
          2        YIELD_FROM                                           ~1      ~0
          3        YIELD                                                $2      ~1
          4      > GENERATOR_RETURN                                             
          5*     > GENERATOR_RETURN                                             

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
168.24 ms | 1415 KiB | 13 Q