3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Apple { public function firstMethod() { } final public function secondMethod() { } public static function thirdMethod() { } protected function fMethod() { } final protected function gMethod() { } private static function hMethod() { } } $class = new ReflectionClass('Apple'); $methods = $class->getMethods(ReflectionMethod::IS_PUBLIC ^ ReflectionMethod::IS_STATIC); var_dump($methods);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/mWhCQ
function name:  (null)
number of ops:  12
compiled vars:  !0 = $class, !1 = $methods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Apple'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   13     4        INIT_METHOD_CALL                                         !0, 'getMethods'
          5        SEND_VAL_EX                                              17
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   14     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

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

End of function firstmethod

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

End of function secondmethod

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

End of function thirdmethod

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

End of function fmethod

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

End of function gmethod

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

End of function hmethod

End of class Apple.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
167.49 ms | 1400 KiB | 15 Q