3v4l.org

run code in 300+ PHP versions simultaneously
<?php class ClassA {} class ClassB extends ClassA { public function methodA(self $self, parent $parent) {} } $c = new ReflectionClass('ClassB'); $m = $c->getMethod('methodA'); $t1 = $m->getParameters()[0]->getType()->getName(); $t2 = $m->getParameters()[1]->getType()->getName(); var_dump($t1, $t2, (string) $m);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CDgSk
function name:  (null)
number of ops:  31
compiled vars:  !0 = $c, !1 = $m, !2 = $t1, !3 = $t2
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   10     0  E >   NEW                                              $4      'ReflectionClass'
          1        SEND_VAL_EX                                              'ClassB'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $4
   11     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'methodA'
          6        DO_FCALL                                      0  $7      
          7        ASSIGN                                                   !1, $7
   12     8        INIT_METHOD_CALL                                         !1, 'getParameters'
          9        DO_FCALL                                      0  $9      
         10        FETCH_DIM_R                                      ~10     $9, 0
         11        INIT_METHOD_CALL                                         ~10, 'getType'
         12        DO_FCALL                                      0  $11     
         13        INIT_METHOD_CALL                                         $11, 'getName'
         14        DO_FCALL                                      0  $12     
         15        ASSIGN                                                   !2, $12
   13    16        INIT_METHOD_CALL                                         !1, 'getParameters'
         17        DO_FCALL                                      0  $14     
         18        FETCH_DIM_R                                      ~15     $14, 1
         19        INIT_METHOD_CALL                                         ~15, 'getType'
         20        DO_FCALL                                      0  $16     
         21        INIT_METHOD_CALL                                         $16, 'getName'
         22        DO_FCALL                                      0  $17     
         23        ASSIGN                                                   !3, $17
   15    24        INIT_FCALL                                               'var_dump'
         25        SEND_VAR                                                 !2
         26        SEND_VAR                                                 !3
         27        CAST                                          6  ~19     !1
         28        SEND_VAL                                                 ~19
         29        DO_ICALL                                                 
         30      > RETURN                                                   1

Class ClassA: [no user functions]
Class ClassB:
Function methoda:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/CDgSk
function name:  methodA
number of ops:  3
compiled vars:  !0 = $self, !1 = $parent
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    7     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function methoda

End of class ClassB.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
138.34 ms | 1437 KiB | 14 Q