3v4l.org

run code in 300+ PHP versions simultaneously
<?php function func() { foreach (['item'] as $item) { class C { function f() { echo $item; } } } } $c = new C; $c->f();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r3Jll
function name:  (null)
number of ops:  6
compiled vars:  !0 = $c
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $1      'C'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   12     3        INIT_METHOD_CALL                                         !0, 'f'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function func:
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 1, Position 2 = 4
Branch analysis from position: 1
2 jumps found. (Code = 78) Position 1 = 2, Position 2 = 4
Branch analysis from position: 2
1 jumps found. (Code = 42) Position 1 = 1
Branch analysis from position: 1
Branch analysis from position: 4
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 4
filename:       /in/r3Jll
function name:  func
number of ops:  6
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E > > FE_RESET_R                                       $1      <array>, ->4
          1    > > FE_FETCH_R                                               $1, !0, ->4
    4     2    >   DECLARE_CLASS                                            'c'
    3     3      > JMP                                                      ->1
          4    >   FE_FREE                                                  $1
   10     5      > RETURN                                                   null

End of function func

Class C:
Function f:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/r3Jll
function name:  f
number of ops:  2
compiled vars:  !0 = $item
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   ECHO                                                     !0
    7     1      > RETURN                                                   null

End of function f

End of class C.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.06 ms | 1394 KiB | 13 Q