3v4l.org

run code in 300+ PHP versions simultaneously
<?php /** * Correct docblock */ $func = static function( /** wrong dockblock */ $arg ) { }; $reflection = new ReflectionFunction($func); echo $reflection->getDocComment();
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0KFkR
function name:  (null)
number of ops:  10
compiled vars:  !0 = $func, !1 = $reflection
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   DECLARE_LAMBDA_FUNCTION                          ~2      [0]
          1        ASSIGN                                                   !0, ~2
   12     2        NEW                                              $4      'ReflectionFunction'
          3        SEND_VAR_EX                                              !0
          4        DO_FCALL                                      0          
          5        ASSIGN                                                   !1, $4
   14     6        INIT_METHOD_CALL                                         !1, 'getDocComment'
          7        DO_FCALL                                      0  $7      
          8        ECHO                                                     $7
          9      > RETURN                                                   1


Dynamic Functions:
Dynamic Function 0
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/0KFkR
function name:  {closure}
number of ops:  2
compiled vars:  !0 = $arg
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    6     0  E >   RECV                                             !0      
   10     1      > RETURN                                                   null

End of Dynamic Function 0

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
145.21 ms | 1006 KiB | 13 Q