3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array( 1, 2, 3, 4, 5, 6 ); echo function () use ($arr) { foreach ($arr as $integerValue) { yield $integerValue; } };
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/HFv1j
function name:  (null)
number of ops:  5
compiled vars:  !0 = $arr
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    6     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHFv1j%3A6%240'
          2        BIND_LEXICAL                                             ~2, !0
   10     3        ECHO                                                     ~2
          4      > RETURN                                                   1

Function %00%7Bclosure%7D%2Fin%2FHFv1j%3A6%240:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 3, Position 2 = 6
Branch analysis from position: 3
2 jumps found. (Code = 78) Position 1 = 4, Position 2 = 6
Branch analysis from position: 4
1 jumps found. (Code = 42) Position 1 = 3
Branch analysis from position: 3
Branch analysis from position: 6
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 6
filename:       /in/HFv1j
function name:  {closure}
number of ops:  8
compiled vars:  !0 = $arr, !1 = $integerValue
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GENERATOR_CREATE                                         
          1        BIND_STATIC                                              !0
    7     2      > FE_RESET_R                                       $2      !0, ->6
          3    > > FE_FETCH_R                                               $2, !1, ->6
    8     4    >   YIELD                                                    !1
    7     5      > JMP                                                      ->3
          6    >   FE_FREE                                                  $2
   10     7      > GENERATOR_RETURN                                         

End of function %00%7Bclosure%7D%2Fin%2FHFv1j%3A6%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
161.49 ms | 1385 KiB | 13 Q