3v4l.org

run code in 500+ PHP versions simultaneously
<?php $g = function (): Generator { yield from [1,2,3,4]; }; echo "$i + "; $g = $g(); foreach($g as $h) { print "h:$h - "; foreach($g as $i) { echo "i:$i + "; break 1; } }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 9, Position 2 = 24
Branch analysis from position: 9
2 jumps found. (Code = 78) Position 1 = 10, Position 2 = 24
Branch analysis from position: 10
2 jumps found. (Code = 77) Position 1 = 15, Position 2 = 22
Branch analysis from position: 15
2 jumps found. (Code = 78) Position 1 = 16, Position 2 = 22
Branch analysis from position: 16
1 jumps found. (Code = 42) Position 1 = 22
Branch analysis from position: 22
1 jumps found. (Code = 42) Position 1 = 9
Branch analysis from position: 9
Branch analysis from position: 22
Branch analysis from position: 22
Branch analysis from position: 24
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 24
filename:       /in/J6iLN
function name:  (null)
number of ops:  26
compiled vars:  !0 = $g, !1 = $i, !2 = $h
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   DECLARE_LAMBDA_FUNCTION                              ~3      [0]
          1        ASSIGN                                                       !0, ~3
    5     2        NOP                                                          
          3        FAST_CONCAT                                          ~5      !1, '+%2B+'
          4        ECHO                                                         ~5
    7     5        INIT_DYNAMIC_CALL                                            !0
          6        DO_FCALL                                          0  $6      
          7        ASSIGN                                                       !0, $6
    9     8      > FE_RESET_R                                           $8      !0, ->24
          9    > > FE_FETCH_R                                                   $8, !2, ->24
   10    10    >   ROPE_INIT                                         3  ~10     'h%3A'
         11        ROPE_ADD                                          1  ~10     ~10, !2
         12        ROPE_END                                          2  ~9      ~10, '+-+'
         13        ECHO                                                         ~9
   11    14      > FE_RESET_R                                           $12     !0, ->22
         15    > > FE_FETCH_R                                                   $12, !1, ->22
   12    16    >   ROPE_INIT                                         3  ~14     'i%3A'
         17        ROPE_ADD                                          1  ~14     ~14, !1
         18        ROPE_END                                          2  ~13     ~14, '+%2B+'
         19        ECHO                                                         ~13
   14    20      > JMP                                                          ->22
   11    21*       JMP                                                          ->15
         22    >   FE_FREE                                                      $12
    9    23      > JMP                                                          ->9
         24    >   FE_FREE                                                      $8
   16    25      > 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/J6iLN
function name:  {closure:/in/J6iLN:3}
number of ops:  4
compiled vars:  none
line      #* E I O op                               fetch          ext  return  operands
-----------------------------------------------------------------------------------------
    3     0  E >   GENERATOR_CREATE                                             
    4     1        YIELD_FROM                                           ~0      <array>
          2        FREE                                                         ~0
    5     3      > GENERATOR_RETURN                                             

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.5.0


preferences:
147.6 ms | 3417 KiB | 13 Q