3v4l.org

run code in 300+ PHP versions simultaneously
<?php class BaseController { } class UserController extends BaseController { public static $get; public function get($id) { echo "Get: $id"; } public static function init() { $r = new ReflectionClass(static::class); $methods = $r-getMethods(ReflectionMethod::IS_PUBLIC); var_dump($methods); } } echo UserController::init(); echo UserController::$get;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiSWk
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   22     0  E >   INIT_STATIC_METHOD_CALL                                  'UserController', 'init'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   23     3        FETCH_STATIC_PROP_R          unknown             ~1      'get'
          4        ECHO                                                     ~1
          5      > RETURN                                                   1

Class BaseController: [no user functions]
Class UserController:
Function get:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiSWk
function name:  get
number of ops:  5
compiled vars:  !0 = $id
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   RECV                                             !0      
   11     1        NOP                                                      
          2        FAST_CONCAT                                      ~1      'Get%3A+', !0
          3        ECHO                                                     ~1
   12     4      > RETURN                                                   null

End of function get

Function init:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/SiSWk
function name:  init
number of ops:  14
compiled vars:  !0 = $r, !1 = $methods
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $2      'ReflectionClass'
          1        FETCH_CLASS_NAME                                 ~3      
          2        SEND_VAL_EX                                              ~3
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $2
   16     5        INIT_FCALL_BY_NAME                                       'getMethods'
          6        SEND_VAL_EX                                              1
          7        DO_FCALL                                      0  $6      
          8        SUB                                              ~7      !0, $6
          9        ASSIGN                                                   !1, ~7
   17    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
   18    13      > RETURN                                                   null

End of function init

End of class UserController.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
165.89 ms | 1400 KiB | 15 Q