3v4l.org

run code in 300+ PHP versions simultaneously
<?php $list = [2, 4, 6]; $d = function(array $list){ foreach ($list as $x) yield $x * $x; }; foreach ($d() as $e) { echo $e . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 10
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 10
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/HuQbg
function name:  (null)
number of ops:  12
compiled vars:  !0 = $list, !1 = $d, !2 = $e
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   ASSIGN                                                   !0, <array>
    5     1        DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FHuQbg%3A5%240'
          2        ASSIGN                                                   !1, ~4
    9     3        INIT_DYNAMIC_CALL                                        !1
          4        DO_FCALL                                      0  $6      
          5      > FE_RESET_R                                       $7      $6, ->10
          6    > > FE_FETCH_R                                               $7, !2, ->10
   10     7    >   CONCAT                                           ~8      !2, '%0A'
          8        ECHO                                                     ~8
    9     9      > JMP                                                      ->6
         10    >   FE_FREE                                                  $7
   11    11      > RETURN                                                   1

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

End of function %00%7Bclosure%7D%2Fin%2FHuQbg%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
175.79 ms | 1399 KiB | 13 Q