3v4l.org

run code in 300+ PHP versions simultaneously
<?php @eval('abc'); class foo { function test() { foreach (array(1, 2) as $value) { yield $value; } } } foreach ((new foo)->test() as $value) {}
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 8, Position 2 = 10
Branch analysis from position: 8
2 jumps found. (Code = 78) Position 1 = 9, Position 2 = 10
Branch analysis from position: 9
1 jumps found. (Code = 42) Position 1 = 8
Branch analysis from position: 8
Branch analysis from position: 10
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 10
filename:       /in/apdO6
function name:  (null)
number of ops:  12
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
   14     3        NEW                                              $3      'foo'
          4        DO_FCALL                                      0          
          5        INIT_METHOD_CALL                                         $3, 'test'
          6        DO_FCALL                                      0  $5      
          7      > FE_RESET_R                                       $6      $5, ->10
          8    > > FE_FETCH_R                                               $6, !0, ->10
          9    > > JMP                                                      ->8
         10    >   FE_FREE                                                  $6
         11      > RETURN                                                   1

Class foo:
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/apdO6
function name:  test
number of ops:  7
compiled vars:  !0 = $value
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   GENERATOR_CREATE                                         
    8     1      > FE_RESET_R                                       $1      <array>, ->5
          2    > > FE_FETCH_R                                               $1, !0, ->5
    9     3    >   YIELD                                                    !0
    8     4      > JMP                                                      ->2
          5    >   FE_FREE                                                  $1
   11     6      > GENERATOR_RETURN                                         

End of function test

End of class foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
150.9 ms | 1394 KiB | 13 Q