3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Foo { public function Bar($foo, $baz = null) {} } $refC = new ReflectionClass('Foo'); $refM = $refC->getMethod('Bar'); var_dump($refM->getParameters());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/YcAug
function name:  (null)
number of ops:  14
compiled vars:  !0 = $refC, !1 = $refM
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   NEW                                              $2      'ReflectionClass'
          1        SEND_VAL_EX                                              'Foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $2
    9     4        INIT_METHOD_CALL                                         !0, 'getMethod'
          5        SEND_VAL_EX                                              'Bar'
          6        DO_FCALL                                      0  $5      
          7        ASSIGN                                                   !1, $5
   10     8        INIT_FCALL                                               'var_dump'
          9        INIT_METHOD_CALL                                         !1, 'getParameters'
         10        DO_FCALL                                      0  $7      
         11        SEND_VAR                                                 $7
         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/YcAug
function name:  Bar
number of ops:  3
compiled vars:  !0 = $foo, !1 = $baz
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    4     0  E >   RECV                                             !0      
          1        RECV_INIT                                        !1      null
          2      > RETURN                                                   null

End of function bar

End of class Foo.

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
151.63 ms | 1399 KiB | 15 Q