3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function load(string $file, array $keymap) {} public function write(string $file, array $keymap, array $data) {} private function validate(array $data) {} } $reflection = new \ReflectionClass('Foo'); $method = $reflection->getMethod('load'); var_dump($method);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ijkn
function name:  (null)
number of ops:  12
compiled vars:  !0 = $reflection, !1 = $method
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   11     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
   13     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'load'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   15     8        INIT_FCALL                                               'var_dump'
          9        SEND_VAR                                                 !1
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Class Foo:
Function load:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ijkn
function name:  load
number of ops:  3
compiled vars:  !0 = $file, !1 = $keymap
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2      > RETURN                                                   null

End of function load

Function write:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ijkn
function name:  write
number of ops:  4
compiled vars:  !0 = $file, !1 = $keymap, !2 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
          1        RECV                                             !1      
          2        RECV                                             !2      
          3      > RETURN                                                   null

End of function write

Function validate:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/4ijkn
function name:  validate
number of ops:  2
compiled vars:  !0 = $data
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   RECV                                             !0      
          1      > RETURN                                                   null

End of function validate

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
170.83 ms | 1396 KiB | 15 Q