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($this); var_dump(get_class($r)); } } echo UserController::init(); echo UserController::$get;
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/nHJdd
function name:  (null)
number of ops:  6
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   INIT_STATIC_METHOD_CALL                                  'UserController', 'init'
          1        DO_FCALL                                      0  $0      
          2        ECHO                                                     $0
   22     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/nHJdd
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/nHJdd
function name:  init
number of ops:  10
compiled vars:  !0 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   15     0  E >   NEW                                              $1      'ReflectionClass'
          1        FETCH_THIS                                       $2      
          2        SEND_VAR_EX                                              $2
          3        DO_FCALL                                      0          
          4        ASSIGN                                                   !0, $1
   16     5        INIT_FCALL                                               'var_dump'
          6        GET_CLASS                                        ~5      !0
          7        SEND_VAL                                                 ~5
          8        DO_ICALL                                                 
   17     9      > RETURN                                                   null

End of function init

End of class UserController.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.43 ms | 1395 KiB | 15 Q