3v4l.org

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

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

End of function mypublicnonstatic

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

End of function mypublicstatic

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

End of function myprivate

End of class StaticTest.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
160.34 ms | 1395 KiB | 15 Q