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'); $param = $method->getParameter('bar'); var_dump($param);
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EvIIB
function name:  (null)
number of ops:  14
compiled vars:  !0 = $method, !1 = $param
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   ECHO                                                     '8.0.0%0A'
   10     1        NEW                                              $2      'ReflectionMethod'
          2        SEND_VAL_EX                                              'Foo'
          3        SEND_VAL_EX                                              'bar'
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $2
   11     6        INIT_METHOD_CALL                                         !0, 'getParameter'
          7        SEND_VAL_EX                                              'bar'
          8        DO_FCALL                                      0  $5      
          9        ASSIGN                                                   !1, $5
   12    10        INIT_FCALL                                               'var_dump'
         11        SEND_VAR                                                 !1
         12        DO_ICALL                                                 
         13      > RETURN                                                   1

Class Foo:
Function bar:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/EvIIB
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:
155.97 ms | 1395 KiB | 15 Q