3v4l.org

run code in 300+ PHP versions simultaneously
<?php namespace N; class Cl {} eval(<<<'EOF' use N\Cl; class U { /** * @return Cl */ public function test() { throw new \Exception(); } } EOF); $u = new \U(); $refl = new \ReflectionMethod($u, 'test'); var_dump($refl->getFileName()); var_dump($refl->getDocComment());
Finding entry points
Branch analysis from position: 0
1 jumps found. (Code = 62) Position 1 = -2
filename:       /in/djLIA
function name:  (null)
number of ops:  20
compiled vars:  !0 = $u, !1 = $refl
line      #* E I O op                           fetch          ext  return  operands
-------------------------------------------------------------------------------------
    8     0  E >   INCLUDE_OR_EVAL                                          '++++use+N%5CCl%3B%0A++++%0A++++class+U+%7B%0A++++++++%2F%2A%2A%0A+++++++++%2A+%40return+Cl%0A+++++++++%2A%2F%0A++++++++public+function+test%28%29+%7B+throw+new+%5CException%28%29%3B+%7D%0A++++%7D', EVAL
   18     1        NEW                                              $3      'U'
          2        DO_FCALL                                      0          
          3        ASSIGN                                                   !0, $3
   19     4        NEW                                              $6      'ReflectionMethod'
          5        SEND_VAR_EX                                              !0
          6        SEND_VAL_EX                                              'test'
          7        DO_FCALL                                      0          
          8        ASSIGN                                                   !1, $6
   20     9        INIT_NS_FCALL_BY_NAME                                    'N%5Cvar_dump'
         10        INIT_METHOD_CALL                                         !1, 'getFileName'
         11        DO_FCALL                                      0  $9      
         12        SEND_VAR_NO_REF_EX                                       $9
         13        DO_FCALL                                      0          
   21    14        INIT_NS_FCALL_BY_NAME                                    'N%5Cvar_dump'
         15        INIT_METHOD_CALL                                         !1, 'getDocComment'
         16        DO_FCALL                                      0  $11     
         17        SEND_VAR_NO_REF_EX                                       $11
         18        DO_FCALL                                      0          
         19      > RETURN                                                   1

Class N\Cl: [no user functions]

Generated using Vulcan Logic Dumper, using php 8.0.0


preferences:
149.38 ms | 1009 KiB | 14 Q