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->getDocComment());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ygki2
function name:  (null)
number of ops:  12
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, 'getDocComment'
          8        DO_FCALL                                      0  $5      
          9        SEND_VAR                                                 $5
         10        DO_ICALL                                                 
         11      > RETURN                                                   1

Function foo:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ygki2
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%2FYgki2%3A9%240'
          1      > RETURN                                                   ~0
   10     2*     > RETURN                                                   null

End of function foo

Function %00%7Bclosure%7D%2Fin%2FYgki2%3A9%240:
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/Ygki2
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%2FYgki2%3A9%240

Class C: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
168.45 ms | 1398 KiB | 16 Q