3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C {} function foo(C $c, $x) { } $reflFunction = new ReflectionFunction('foo'); var_export($reflFunction->getParameters()[0]->getClass()); var_export($reflFunction->getParameters()[1]->getClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXOZI
function name:  (null)
number of ops:  21
compiled vars:  !0 = $reflFunction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   NEW                                              $1      'ReflectionFunction'
          1        SEND_VAL_EX                                              'foo'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $1
   11     4        INIT_FCALL                                               'var_export'
          5        INIT_METHOD_CALL                                         !0, 'getParameters'
          6        DO_FCALL                                      0  $4      
          7        FETCH_DIM_R                                      ~5      $4, 0
          8        INIT_METHOD_CALL                                         ~5, 'getClass'
          9        DO_FCALL                                      0  $6      
         10        SEND_VAR                                                 $6
         11        DO_ICALL                                                 
   12    12        INIT_FCALL                                               'var_export'
         13        INIT_METHOD_CALL                                         !0, 'getParameters'
         14        DO_FCALL                                      0  $8      
         15        FETCH_DIM_R                                      ~9      $8, 1
         16        INIT_METHOD_CALL                                         ~9, 'getClass'
         17        DO_FCALL                                      0  $10     
         18        SEND_VAR                                                 $10
         19        DO_ICALL                                                 
         20      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/UXOZI
function name:  foo
number of ops:  3
compiled vars:  !0 = $c, !1 = $x
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   RECV                                             !0      
          1        RECV                                             !1      
    7     2      > RETURN                                                   null

End of function foo

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
155.02 ms | 1395 KiB | 15 Q