3v4l.org

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

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

End of function test

End of class t1.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.91 ms | 1395 KiB | 13 Q