3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace X; $f = function () {}; $r = new \ReflectionMethod($f, '__invoke'); var_dump($r->isClosure()); var_dump($r->getDeclaringClass());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/aKMsD
function name:  (null)
number of ops:  18
compiled vars:  !0 = $f, !1 = $r
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    5     0  E >   DECLARE_LAMBDA_FUNCTION                                  '%00x%5C%7Bclosure%7D%2Fin%2FaKMsD%3A5%240'
          1        ASSIGN                                                   !0, ~2
    7     2        NEW                                              $4      'ReflectionMethod'
          3        SEND_VAR_EX                                              !0
          4        SEND_VAL_EX                                              '__invoke'
          5        DO_FCALL                                      0          
          6        ASSIGN                                                   !1, $4
    8     7        INIT_NS_FCALL_BY_NAME                                    'X%5Cvar_dump'
          8        INIT_METHOD_CALL                                         !1, 'isClosure'
          9        DO_FCALL                                      0  $7      
         10        SEND_VAR_NO_REF_EX                                       $7
         11        DO_FCALL                                      0          
    9    12        INIT_NS_FCALL_BY_NAME                                    'X%5Cvar_dump'
         13        INIT_METHOD_CALL                                         !1, 'getDeclaringClass'
         14        DO_FCALL                                      0  $9      
         15        SEND_VAR_NO_REF_EX                                       $9
         16        DO_FCALL                                      0          
         17      > RETURN                                                   1

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

End of function %00x%5C%7Bclosure%7D%2Fin%2FaKMsD%3A5%240

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
183.68 ms | 1395 KiB | 15 Q