3v4l.org

run code in 300+ PHP versions simultaneously
<?php function trace($val) { var_dump($val); } class Main { public function __construct() { } public function main() { $m = new ReflectionClass('Main'); $m->getMethod('test')->invoke($this); } public function test() { trace("ok"); } } $m = new Main(); $m->main();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sSOQt
function name:  (null)
number of ops:  6
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   21     0  E >   NEW                                              $1      'Main'
          1        DO_FCALL                                      0          
          2        ASSIGN                                                   !0, $1
   22     3        INIT_METHOD_CALL                                         !0, 'main'
          4        DO_FCALL                                      0          
          5      > RETURN                                                   1

Function trace:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sSOQt
function name:  trace
number of ops:  5
compiled vars:  !0 = $val
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    3     0  E >   RECV                                             !0      
    4     1        INIT_FCALL                                               'var_dump'
          2        SEND_VAR                                                 !0
          3        DO_ICALL                                                 
    5     4      > RETURN                                                   null

End of function trace

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

End of function __construct

Function main:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sSOQt
function name:  main
number of ops:  12
compiled vars:  !0 = $m
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'ReflectionClass'
          1        SEND_VAL_EX                                              'Main'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   13     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'test'
          6        DO_FCALL                                      0  $4      
          7        INIT_METHOD_CALL                                         $4, 'invoke'
          8        FETCH_THIS                                       $5      
          9        SEND_VAR_EX                                              $5
         10        DO_FCALL                                      0          
   14    11      > RETURN                                                   null

End of function main

Function test:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/sSOQt
function name:  test
number of ops:  4
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   17     0  E >   INIT_FCALL                                               'trace'
          1        SEND_VAL                                                 'ok'
          2        DO_FCALL                                      0          
   18     3      > RETURN                                                   null

End of function test

End of class Main.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
166.3 ms | 1403 KiB | 16 Q