3v4l.org

run code in 300+ PHP versions simultaneously
<?php @eval('abc'); function test() { foreach (array(1, 2) as $value) { yield $value; } } foreach (test() as $value) {}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 6, Position 2 = 8
Branch analysis from position: 6
2 jumps found. (Code = 78) Position 1 = 7, Position 2 = 8
Branch analysis from position: 7
1 jumps found. (Code = 42) Position 1 = 6
Branch analysis from position: 6
Branch analysis from position: 8
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 8
filename:       /in/T4mAM
function name:  (null)
number of ops:  10
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    2     0  E >   BEGIN_SILENCE                                    ~1      
          1        INCLUDE_OR_EVAL                                          'abc', EVAL
          2        END_SILENCE                                              ~1
   12     3        INIT_FCALL                                               'test'
          4        DO_FCALL                                      0  $3      
          5      > FE_RESET_R                                       $4      $3, ->8
          6    > > FE_FETCH_R                                               $4, !0, ->8
          7    > > JMP                                                      ->6
          8    >   FE_FREE                                                  $4
          9      > RETURN                                                   1

Function test:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 2, Position 2 = 5
Branch analysis from position: 2
2 jumps found. (Code = 78) Position 1 = 3, Position 2 = 5
Branch analysis from position: 3
1 jumps found. (Code = 42) Position 1 = 2
Branch analysis from position: 2
Branch analysis from position: 5
1 jumps found. (Code = 161) Position 1 = -2
Branch analysis from position: 5
filename:       /in/T4mAM
function name:  test
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   GENERATOR_CREATE                                         
    6     1      > FE_RESET_R                                       $1      <array>, ->5
          2    > > FE_FETCH_R                                               $1, !0, ->5
    8     3    >   YIELD                                                    !0
    6     4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $1
   10     6      > GENERATOR_RETURN                                         

End of function test

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.7 ms | 1398 KiB | 14 Q