3v4l.org

run code in 300+ PHP versions simultaneously
<?php class C {} function foo() { /** * @return null */ return function() {}; } $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/iIZEv
function name:  (null)
number of ops:  23
compiled vars:  !0 = $reflFunction
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
   12     0  E >   NEW                                              $1      'ReflectionFunction'
          1        INIT_FCALL                                               'foo'
          2        DO_FCALL                                      0  $2      
          3        SEND_VAR_NO_REF_EX                                       $2
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !0, $1
   14     6        INIT_FCALL                                               'var_export'
          7        INIT_METHOD_CALL                                         !0, 'getParameters'
          8        DO_FCALL                                      0  $5      
          9        FETCH_DIM_R                                      ~6      $5, 0
         10        INIT_METHOD_CALL                                         ~6, 'getClass'
         11        DO_FCALL                                      0  $7      
         12        SEND_VAR                                                 $7
         13        DO_ICALL                                                 
   15    14        INIT_FCALL                                               'var_export'
         15        INIT_METHOD_CALL                                         !0, 'getParameters'
         16        DO_FCALL                                      0  $9      
         17        FETCH_DIM_R                                      ~10     $9, 1
         18        INIT_METHOD_CALL                                         ~10, 'getClass'
         19        DO_FCALL                                      0  $11     
         20        SEND_VAR                                                 $11
         21        DO_ICALL                                                 
         22      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIZEv
function name:  foo
number of ops:  3
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00%7Bclosure%7D%2Fin%2FiIZEv%3A9%240'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FiIZEv%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/iIZEv
function name:  {closure}
number of ops:  1
compiled vars:  none
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    9     0  E > > RETURN                                                   null

End of function %00%7Bclosure%7D%2Fin%2FiIZEv%3A9%240

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
158.76 ms | 1399 KiB | 16 Q