3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function bar() {} public static function baz() {} } $obj = new Foo(); $reflected = new ReflectionClass($obj); var_dump($reflected->getMethods(~ReflectionMethod::Static & ReflectionMethod::Public));
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/TlKUA
function name:  (null)
number of ops:  18
compiled vars:  !0 = $obj, !1 = $reflected
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $2      'Foo'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $2
   10     3        NEW                                              $5      'ReflectionClass'
          4        SEND_VAR_EX                                              !0
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $5
   11     7        INIT_FCALL                                               'var_dump'
          8        INIT_METHOD_CALL                                         !1, 'getMethods'
          9        FETCH_CLASS_CONSTANT                             ~8      'ReflectionMethod', 'Static'
         10        BW_NOT                                           ~9      ~8
         11        FETCH_CLASS_CONSTANT                             ~10     'ReflectionMethod', 'Public'
         12        BW_AND                                           ~11     ~9, ~10
         13        SEND_VAL_EX                                              ~11
         14        DO_FCALL                                      0  $12     
         15        SEND_VAR                                                 $12
         16        DO_ICALL                                                 
         17      > RETURN                                                   1

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

End of function bar

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

End of function baz

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
157.63 ms | 1395 KiB | 15 Q