3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function first(){ } function second(){ } } $foo = new Foo(); $reflect = new ReflectionClass($foo); $props = $reflect->getMethods(); foreach ($props as $prop) { print $prop->getName() . "\n"; }
Finding entry points
Branch analysis from position: 0
2 jumps found. (Code = 77) Position 1 = 11, Position 2 = 17
Branch analysis from position: 11
2 jumps found. (Code = 78) Position 1 = 12, Position 2 = 17
Branch analysis from position: 12
1 jumps found. (Code = 42) Position 1 = 11
Branch analysis from position: 11
Branch analysis from position: 17
1 jumps found. (Code = 62) Position 1 = -2
Branch analysis from position: 17
filename:       /in/NgBJs
function name:  (null)
number of ops:  19
compiled vars:  !0 = $foo, !1 = $reflect, !2 = $props, !3 = $prop
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  13     0  E >   NEW                                              $4      :33
         1        DO_FCALL                                      0          
         2        QM_ASSIGN                                                !0
  15     3        NEW                                              $7      :29
         4        SEND_VAR_EX                                              !0
         5        DO_FCALL                                      0          
         6        QM_ASSIGN                                                !1
  17     7        INIT_METHOD_CALL                                         !1, 'getMethods'
         8        DO_FCALL                                      0  $10     
         9        QM_ASSIGN                                                !2
  19    10      > FE_RESET_R                                       $12     !2, ->17
        11    > > FE_FETCH_R                                               $12, !3, ->17
  20    12    >   INIT_METHOD_CALL                                         !3, 'getName'
        13        DO_FCALL                                      0  $13     
        14        CONCAT                                           ~14     $13, '%0A'
        15        ASSIGN_OBJ                                               ~14
  19    16      > JMP                                                      ->11
        17    >   FE_FREE                                                  $12
  21    18      > RETURN                                                   1

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

End of function first

Function second:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/NgBJs
function name:  second
number of ops:  1
compiled vars:  none
line     #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
  10     0  E > > RETURN                                                   null

End of function second

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
15.05 ms | 412 KiB | 7 Q