3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { function bar(int $foo) { } } echo PHP_VERSION . "\n"; $method = new ReflectionMethod('Foo', 'bar'); $params = $method->getParameters(); $param = $params[0]; var_dump($param);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/DOFL4
function name:  (null)
number of ops:  15
compiled vars:  !0 = $method, !1 = $params, !2 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '8.0.0%0A'
   10     1        NEW                                              $3      'ReflectionMethod'
          2        SEND_VAL_EX                                              'Foo'
          3        SEND_VAL_EX                                              'bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $3
   11     6        INIT_METHOD_CALL                                         !0, 'getParameters'
          7        DO_FCALL                                      0  $6      
          8        ASSIGN                                                   !1, $6
   12     9        FETCH_DIM_R                                      ~8      !1, 0
         10        ASSIGN                                                   !2, ~8
   13    11        INIT_FCALL                                               'var_dump'
         12        SEND_VAR                                                 !2
         13        DO_ICALL                                                 
         14      > RETURN                                                   1

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

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
174.64 ms | 1395 KiB | 15 Q