3v4l.org

run code in 300+ PHP versions simultaneously
<?php interface ExampleInterface { public function foo(); public function bar(); } $reflection = new ReflectionClass(ExampleInterface::class); var_dump($reflection->isInterface()); $methods = $reflection->getMethods(); var_dump($methods[0]);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EqsYq
function name:  (null)
number of ops:  17
compiled vars:  !0 = $reflection, !1 = $methods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'ExampleInterface'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   11     4        INIT_FCALL                                               'var_dump'
          5        INIT_METHOD_CALL                                         !0, 'isInterface'
          6        DO_FCALL                                      0  $5      
          7        SEND_VAR                                                 $5
          8        DO_ICALL                                                 
   13     9        INIT_METHOD_CALL                                         !0, 'getMethods'
         10        DO_FCALL                                      0  $7      
         11        ASSIGN                                                   !1, $7
   15    12        INIT_FCALL                                               'var_dump'
         13        FETCH_DIM_R                                      ~9      !1, 0
         14        SEND_VAL                                                 ~9
         15        DO_ICALL                                                 
         16      > RETURN                                                   1

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

End of function foo

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

End of function bar

End of class ExampleInterface.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
137.46 ms | 998 KiB | 14 Q